High Level Languages

Higher level languages make use of English like words and statements and mathematical symbols for instructions. Higher level languages make programming easier, since they are relatively easy to learn. Less time is required to write programs in high level languages. The programmer is not required to know the detailed working of the computer system in order to program in a high level language. They are machine independent. Higher level languages are also known as problem oriented languages. However a high level language is not directly understood by the computer. It is required to be translated into machine language. Therefore they generally execute more slowly and require more memory than the same program written in assembly language.

The programs which are used to translate programs written in high level language into machine language are known as translators. The types of translators are:

I) Compiler

II) Interpreter

I) Compiler:

The compiler translates the entire source program into machine language program at once. The source code remains intact. Once a program is compiled it can be run as many times as required, without being required to be recompiled. A compiler can translate only those programs which have been written in the language for which it is designed. Also each machine has to have its own compiler.

A compiler is a program which normally resides on the secondary storage device. It gets loaded into the CPU when the source program is to be translated. A compiler checks for errors like illegal symbols, statements etc. during compilation and gives out a list of error messages at the end of execution. This is a very valuable aid to the programmer to correct the programs. However, the compiler is incapable of detecting any logical errors in the program.

II) Interpreter:

The interpreter is the program which translates a high level language program into machine language as follows :

Ø  it takes one statement from the high level language program

Ø  translates it into a machine instruction and the instruction is immediately executed.

Since the program is translated statement by statement, the machine level program of the source program is not stored anywhere in memory.

Therefore, the program has to be interpreted every time when it has to be run. Thus no object code is generated. The interpreted programs are generally slower than compiled programs. However, if any changes are made in the source program it can interpret only those statements and it is not required to compile the entire program again. Interpreters are relatively easy to write and smaller in size as compared to compilers.

Thus assemblers, compilers and interpreters are systems software which translate the source program into object program i.e. program which can be understood by the computer. These translators are also known as language processors.