Generation of programming languages

   The concept of generations of programming languages are closely connected to the advances in technology that brought about computer generations. The four generations of programming languages are.



  • Machine languages
  • Assembly languages
  • High-level language(also known as third generation language)
  • Very high-level language(also known as fourth generation language)
First Generation:Machine Language

Machine language was used to program the first stored program on computer systems. This is the lowest level of programming language. The machine language is the only language that computer understands. All the commands of data values are expressed using 1 and 0s, corresponding to the 'on' and 'off'electrical states in a computer.

In the 1950s each computer had its own native language, and programmers had primitive systems for combining numbers to represent instructions such as add and subtract. In machine language, all instructions,memory locations,numbers, and characters are represented in strings of 1s and 0s. Although machine-language programs are typically displayed with the binary numbers represented in octal or hexadecimal these programs are not easy for humans read,write or debug.
The main advantage of machine language is that the code can run very fast and efficiently,since it is directly executed by the CPU.

Last but not the least, the code written in machine language is not portable across systems and transfer the code to a different computer it needs to be completely rewritten since the machine language for one computer could be significantly different from another computer.

Second Generation:Assembly Language

The second generation of programming language includes the assembly language. Assembly languages are symbolic programming languages that use symbolic notation to represent machine-language instructions. These languages are closely connected to machine language and the internal architecture of the computer system on which they are used. Assembly language is also called a low-level language.

Assembly language developed in the mid 1950s was a great leap forward. It used symbolic codes also known as mnemonic codes that are easy-to-remember abbreviations,rather than numbers.Example of these codes include ADD for add, CMP for compare, MUL for multiply etc.

Assembly language programs consist of a series of individual statements or instruction that instruct the computer what to do. Basically, an assembly language statement consists of a label, an operation code, and one or more operands.

However, like the machine language, the statement or instruction in the assembly language will vary from machine to another because the language is directly related to the internal architecture of the computer and is not designed to be machine independent.This makes the code written in assembly language less portable as the code written for one machine will not run as machines from a different or sometimes even the same manufacture.

The code written in assembly language will be very efficient in terms of execution and main memory usage as the language is also close to the computer. Assembly language need a translator often known as the assembler to convert them into machine language.This is because the computer understand only the language of 1s and 0s and will not understand mnemonics like ADD and SUB.

Third Generation Programming Language

A third generation programming language is a refinement of the second generation programming language. The 2GL languages brought logical structure to software. The third generation was introduced to make the language more programmer friendly.

Generally, a statement written in a high-level programming language will expand into several machine language instructions. This is in contrast to assembly languages,where one statement would generate one machine language instruction. 3GL made programming easier,efficient and less prone to errors.

High-level languages fall somewhere between natural languages and machine languages. 3GL includes languages like FORTAN(FORmula TRANslator) and COBOL (COmmon Bussiness Oriented Language) that made it possible for scientists and business people to write programs using familiar terms instead of obscure machine instruction.

Although 3GL relieve the programmer of demanding details they do not provide the flexibility available in low-level languages.However a few high-level languages like C and FORTAN combine some flexibility of assembly language with the power of high-level languages but these are not well suited to amateur programmer.

3GLs make easy to write and debug a program and gives the programmer more time to think about its overall logic. The programmer more time to think about its overall logic. The programs written in such languages are portable between machines. For example a program written in standard C can be complied and executed on any computer that has a standard C compiler.

Fourth Generation:Very High-Level Languages

Fourth generation programming languages is a little different from its prior generation because they are non-procedural. When writing code using procedural language the programmer has to tell the computer how a task is done-add this, compare that, do this if the condition is true and so on, in a very specific step-by-step manner.While using a non-procedural language the programmers define only what they want the computer to do, without supplying all the details of how it has to be done.

A 4GL is the query language that allows a user to request information from database with precisely worded English like sentences.A query language is used as a database from the user.For example, when working with structured Query Language(SQL), the programming just needs to remember a few rules of syntax and logic, but it is easier to learn than COBOL or C.


Comments