2.7 LANGUAGE TRANSLATORS

Language translators (compiler, interpreter and assembler) are system software that converts source code into machine code. A program written in high-level language is called as source code. Each of the language translators has a specific meaning, but all of them work in some way towards getting a high-level programming language translated into machine language that a processor (CPU) can understand. It also detects and reports the error during translation, if a programmer violates specification of the high-level language program. Mainly there are the following types of language translators-


• Assembler
• Compiler
• Interpreter

Assembler-

An assembler translates a program written in assembly language into machine language. Assembly language is a low-level programming language. Low-level programming languages are less like human language in that they are more difficult to understand. Assembly language code is more often used with 8-bit processors.

Compiler-

Compiler translates high-level language code to lower-level machine language all at once and then save the object code to memory. A compiler creates machine code that executes on a processor with a specific Instruction Set Architecture (ISA), which is processor-dependent. Compilers are platform-dependent.

Interpreter-

An interpreter translates code like a compiler but reads the code and immediately executes on that code, and therefore is initially faster than a compiler. Compilers translate code all at once and the processor then executes upon the machine language that the compiler produced. If changes are made to the code after compilation, the changed code will need to be compiled and added to the compiled code (or perhaps the entire program will need to be re-compiled.)

Licensed under the Creative Commons Attribution Share Alike License 4.0

Made with eXeLearning (New Window)