Chapter 1: history

The births of the generations are as follow. 

First generation, 1945  ‐ machine language 

Second generation, mid‐1950s – assembly language 

Third generation, early 1960s – high‐level languages: FORTRAN, COBOL, C, BASIC, C++, and 

Pascal


First Generation: Machine Language (Low‐Level Language) 

The only programs that can be used to operate a computer. 

The lowest level of computer programming language. 

Machine language or also referred to as executable programs, or executables for short, consist of a sequence of instructions composed of binary numbers (0’s and 1’s) such as:  

10000000   00000001   00000010 

11110000   00000010   00000011

which correspond to on and off of electrical states of the computer, which not convenient for people to read and use. 

Each instruction in a machine language consists of two parts: instruction part and address part. The instruction part is referred to as opcode (operation code), is usually the leftmost set of bits in the instruction. It tells the computer operation to be performed, such as add, subtract, multiply, etc., while the rightmost bits specify the memory addresses of the data to be used. 

For example, assuming that the eight leftmost bits of the first instruction (i.e. 100000000) listed above is the opcode for add, and the next two groups of twelve bits are the addresses of two operands to be added. This instruction would be a command to “add the data in memory location 1 to the data in memory location 2.” 

Similarly, assuming that the opcode 11110000 means multiply, the next instruction is a command to “multiply the data in memory location 3 by the data in location 4”. 


Second Generation: Assembly Language  (Low‐Level Language) 


One of the first advances in programming was the substitution of word‐like symbols, such as ADD, MUL, for the binary opcodes and both decimal numbers and label for memory addresses.  

For example, the previous two machine language instruction can now be written as 

ADD 1, 2 

MUL 2, 3

The particular programming language is called assembly language. Assembly language is a low‐level language that allows a programmer to use abbreviations or easily remembered words instead of numbers. 

Computer can only execute machine language programs, the set of instructions contained within an assembly language program must be translated into machine language. Translator programs that perform this function for assembly language programs are known as assemblers. 

An Assembly 

Language Program 

Translation Program 

(Assembler)

 Machine Language 

Program 


Both machine and assembly languages are classified as low‐level languages, and they generally execute at the fastest level possible. As with the case of machine language, assembly language varies from computer to computer – it is machine dependent.


Third Generation: High‐level language 

A high‐level language is an English‐like programming language. A high‐level language program can be run on a variety of computer types. 

For examples: FORTRAN, Pascal, Java, C++, C, COBOL, ADA, LISP, PL/1, RPG, Logo, APL, FORTH and Prolog. 

As with assembly language, high‐level language requires a translator to translate it into machine language. The translator for high‐level languages is either a compiler or an interpreter (compiler and interpreter will be discussed later in this topic).  

No comments:

Post a Comment