Saturday, April 25, 2009

Computer Language Generations



  • First Generation - Machine Code


  • Second Generation - Assembler language


  • Third Generation - High level language


  • Fourth generation - Query and Database language


  • Beyond Fourth generation- Natural & intelligent language

First generation + Second generation = Low level language

Machine Language

The machine language is the language that the computer can directly understand. Its alphabet has only two symbols” 0 & 1”. Any information or instruction is represented in terms of 0’s and 1’s. the symbol 0 stands for the absence of an electric pulse and 1 for the presence of an electric pulse. Since a computer is an electronic machine, it can recognize the presence and absence of electrical pulses. For example, a sequence of 0’s and 1’s such as 01110001 has a specific meaning for a computer, although it appears as an ordinary binary number for us.

Note that different computer may understand different machine languages. In other words, while using the same alphabet with two symbol 1 & 0, there can be many machine languages. For example, machine languages understood by IBM computers cannot be understood by Macintosh computers.


In the past, computer programmers wrote programs using machine languages. The writing of programs in machine language is very cumbersome and a complicated task. In machine language programming, all the information fed to the computer must be in numeric form. That also must be in binary code. Moreover, the programmer should know the storing locations of instructions and data. He/she should also have an idea on the internal structure of the computer. Although the machine language is readily understood by the computer, it is not easily understood by human beings. In other words, writing of a program in a machine language is a specialist’s job and a common man could not do it. It also takes a lot of time to write and test a program written in this language. Thus, it is necessary to look at better methods of writing programs for computers.


The main purpose of using computer is to solve problems which would otherwise be difficult to solve. Thus, it must be possible for a computer programmer to concentrate on developing efficient programs for solving problems rather than concerning with the details of the internal structure of the computer. It is desirable, but not essential, for programmer to know in detail how a computer works.

Assembly Languages

An assembly language has a bigger alphabet than what machine a language has. The difficulties faced in writing a program in machine language, due to a small alphabet, led to the development of the Assembly language. The programs written in the machine language consists of long strings of 1’s and 0’s. the programmer has to remember codes for each operation. For example, code of addition operation may be 001, for subtraction 011, etc. but assembly language uses symbols for operations, for example, addition operation is denoted by the word ADD and subtraction by SUB. The use of these symbols called mnemonics, relieved the programmers from the job of remembering the codes. In Assembly languages, symbols consisting of strings of characters are used to represent the addresses of memory locations.


As the Assembly Language is designed mainly to replace machine code with an understandable mnemonics and each address with a simple alpha-numeric string, it is matched to a particular computer’s processor structure. It is thus machine dependent.

It is necessary for an assembly language programmer to know all details of a computer’s logical structure in order to write a program. Thus, it has many of the disadvantages of the machine language.

It has already been stated earlier that a computer can understand only the machine language. This means that, a program written in assembly language cannot be executed by a computer. To execute an assembly language program on a computer, it should first be translated to its equivalent machine language. This translation is done by a program called Assembler. It works as an interpreter between the user and the computer. Assembler is a complicated program written in machine language. A program written in any language except the machine language is called a source program. Thus, a program written in Assembly language is a source program. The assembler converts the source program into a machine language program know as object program.


Before an Assembly Language program is fed to the computer, this assembler must be loaded into the computer’s memory. Since assembler is quite a large program, it occupies a considerable portion of the memory. Hence, Assembly language programs cannot run on very small computers, because of the small sized memory. As the machine language does not need any conversion, we do not need any program to translate a machine a machine language program. This is the biggest advantage of the machine level language, over the Assembly language. Every instruction written in assembly language has to be converted to its equivalent machine language instruction. Thus, the execution of Assembly language programs take more time compared to an identical machine language program. Hence, a machine language program is more efficient than an Assembly Language program. However, with the advancement of technology, which resulted in cheap and fast memories, these advantages of machine language programs have become trivial.

Assembly language are more user friendly than machine languages. However, both are machine dependent. Therefore, none of machine language or assembly language can be considered as sufficiently user friendly. These two languages are generally know as low level languages.


High Level Language

During the evolution of computers, till about 1955, computer were slow, and had a small memory. Thus, the efficiency of the programs was very important. The use of computers was also limited to a small group of scientists. Therefore, the assembly language was dominant. But, with the improvements in technology, computers were designed with larger memory capacity, higher speed and improved reliability.


The drawbacks associated with machine and assembly languages led to the development of high level languages. Both machine and assembly languages consumed much time in writing a program Correcting errors took even more time. The writing of programs in low level languages is a highly specialized job. Therefore, the searching for better programming languages continued.


It was in the year 1957, when a High level language called FORTRAN ( abbreviation of FORmula TRANslation) was developed by international Business machine ( IBM ). After this, there was a rapid growth of high level languages. Some examples of such languages are ALGOL, COBOL, BASIC, C, C++, Java, etc. these languages have similarity to the familiar English language in syntax and use common mathematical symbols. Thus, the problem of the programmers to write programs is simplified to a great extent.

In the case of assembly languages, we had to translate assembly language code into machine language. Otherwise computer cannot understand those. In translating we used a program called an assembler. Similarly, programs written using high level languages are also to be translated into a corresponding machine language. The program required for this purpose is generally known as a compiler.



In simple terms, conversion from a high level language to a corresponding machine language is the translation process. So, compliers and assemblers are translators. There is another category of translators called Interpreters. An interpreter translates a source program line by line before going to the next instruction of the program. In contrast, compilers translate the entire program give the machine code. Depending on the requirement both compilers and interpreters have their own advantages and disadvantages.


High level language have very familiar alphabet as in our natural languages. At the same time, their grammar or syntax is very close to our languages. So, learning high level language is relatively straightforward. Therefore, what we today learn as programming languages are know as high level languages.