Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Topic: Program Implementation 

Programming is the art of writing the solution to a problem using a language that a computer
can understand. A programmer actually instructs the computer how to solve a problem. 
A computer program is a set of instructions that tells a computer what to do and how to do it.
These instructions are usually converted into a sequence of numeric codes called machine code
which is stored in memory. 
Programming Languages 
There are many programming languages that can be used to write programs or create other
kinds of software. These languages are grouped into two categories: 
● Low-level Languages 
● High-level Languages 
Low-level Languages 
These languages are machine dependent. That is, the code written can only be understood by
particular computer or processor that was used to write the code. Includes the first and second
generation of programming languages. 
The first-generation language, called machine language, used the digits 0 and 1 that make up
the binary code, for example 101100000 01100001. Machine code can be understood by a
computer, so it does not need to be translated. 
Advantage: 
- Code runs very fast and efficiently because it is directly executed by the CPU.
Disadvantage: 
- Machine dependent 
- The programmer may become confused with the massive amount of 0s and 1s in the
program. 
The second-generation language, called assembly language, has the same structure and
commands as machine language but allows programmers to use abbreviated words
(mnemonics), for example ‘add A, B’, generally meaning ‘add the contents of A and the
contents of B’. Each code looks and sounds like the value or action it represents, but
programmers have to learn and remember them. 
Advantage: 
- Can be easily converted to machine code by a program called an assembler.
Disadvantage: 
- Machine dependent 
- Still difficult to understand compared to high-level languages. 
-
High-level Languages 
High-level languages are different from low-level languages in that they are not machine
dependent. Therefore, programs written on one computer can generally be used on another
similar computer. They also use keywords similar to English and are easier to write. 
Third generation languages (3GLs) are designed to be easier for you to understand. These
languages are converted to machine code, rather like translating from one language to another,
so that the computer can carry out the instructions in the CPU. Examples of third generation
languages are FORTRAN, BASIC Pascal and C. This generation supports procedural
languages, which means the program will execute a sequence of instruction in a specific order. 
Advantage: 
- Can use English-type words to write program code, making it easier to create.
Disadvantage: 
- Programs also have to be converted to machine language. 
Fourth generation languages (4GLs) are non-procedural: programs such as COBAL are
written to provide easy ways of designing screens and reports, and using databases. They
contain commands to read and process the data and place the results in report form on the
page. 
Advantage: 
- Useful for generating reports 
Disadvantage: 
- Can become very wordy 
Fifth generation languages (5GLs) are sometimes regarded as very-high-level languages. In
theory 5GLs, are ‘non-procedural’ languages, meaning that the programmer states the goal to
be achieved, but not the steps required in order to achieve the goal. Prolog is a fifth-generation
language. 
Advantage: 
- Computers will be able to communicate in natural spoken language with their users.
Disadvantage: 
- Very complex to design, programmer must be highly trained. 

You might also like