Followers

Thursday, December 20, 2007

GENERATIONS OF LANGUAGES

We know that computer is a dumb machine. It cannot do anything on its own. For getting any work done from the computer, you need to give instructions to the computer. These instructions are given in a language, which computer can understand. Just as we use some language to communicate with each other, you need some computer language to communicate with computer. There are different computer languages which are classified into Five Generations.

1GL or first-generation language is machine language. In this language the programs are written in the form of ‘0’ and ‘1’. 0 and 1 are the binary numbers which the computer understands. Machine languages are the only languages understood by computers directly. This language is Machine dependent. This means every CPU has its own unique machine language. Programs written on one computer may not run on another computer. Programs must be rewritten or recompiled, therefore, to run on different types of computers.

2GL or second-generation language is assembly language. This language uses mnemonics codes or symbols in place of 0’s and 1’s. A mnemonic is an alphabetical abbreviation used as a memory aid. A typical assembly instruction looks like this:

ADD 12,8

Since the computer can only understand machine language directly, an assembler converts the assembly language statements into machine language.
Assembly language is also machine-dependent and programming in this language is also very tedious.

1GL and 2GL are also known as “Low-Level Languages”.

3GL or third-generation language is a "high-level programming language”, such as PL/I, C, or Java. The disadvantage of the low level language led to the development of the high level languages. This is a programming language designed to be easier for a human to understand, including things like named variables. A typical instruction may look like:

let b = c + 2 * d

A compiler converts the statements of a specific high-level programming language into machine language. A 3GL language requires a considerable amount of programming knowledge.

4GL or fourth-generation language is designed to be closer to natural language than a 3GL language. Languages for accessing databases are often described as 4GLs. A 4GL language statement might look like this:

EXTRACT ALL CUSTOMERS WHERE "PREVIOUS PURCHASES" TOTAL MORE THAN $1000

5GL or fifth-generation language is designed to make the computer solve the problem for you whereas fourth-generation programming languages are designed to build specific programs. 5GL programming uses a visual or graphical development interface to create source language that is usually compiled with a 3GL or 4GL language compiler. Fifth-generation languages are used mainly in artificial intelligence research. Prolog, OPS5, and Mercury are the best known fifth-generation languages.

No comments: