0
The Translators
Programming Concepts

The Translators:

It is a well-known fact that the computer understands the binary language, also referred to as the low level language or machine level language or first generation language. But the language we use to code or write a program is a high level language. So it is obvious that there is a mechanism that coverts this high level language into the low level language. This work is done by what are called as translators.

They are namely, the ‘compiler’ and the ‘interpreter’. These translate the high level language into the machine level language. There is something called as the assembly level language or the middle or second generation language that uses the mnemonic codes to write the program. This language uses ‘assembler’ to translate stuffs into binary. Now we shall see what these interpreter and compiler are. It will be easy to understand if we just look at the comparison between them. Basically both the translators do the same work with following differences: 1. The compiler takes the entire source code and converts the entire source code into the machine level language whereas the interpreter takes the source code and there is a line-by-line translation that takes place.

  1. The compiler will create an executable file that is .exe file and interpreter doesn’t create any such file.

  2. The compiled files are OS independent and can be run in any operating system by the virtue of .exe file generated whereas the interpreted file is OS dependent.

  3. As the compiler, translates the entire source code, the run time of a compiled code is more when compared with that of an interpreted code.

  4. As compiler, translates the entire source code at a time, we cannot make any dynamic changes in the source code, what I mean to say is, we cannot make any changes in the source code while the program is being executed whereas we can make changes in the source code during run time of a interpreted file as the translation is a line-by-line translation.

  5. Languages like C, C++ use compilers and languages like Perl, BASIC, Java and JavaScript use interpreters.

These were some basic concepts to understand the basic differences between the translators existing in the programming world useful especially for beginners.

Happy Coding....!!

Notifications

?