What are Language Translators?

Language Translators

Language Translators

Computer understands instructions written in machine language. Any program written in high level language or assembly language must be translated into machine code before executing on computer. Language translator or language processor is software that converts instructions written in high level languages or assembly language into machine language. Every computer language has its own language translator.

Different types of language translators are as follows:

Types of Language Translators

Compiler

The language translator program that translate complete source code into Machine Code as a whole is called “Compiler”. The C/C++ translators are examples of Compilers. The source code is translated into object code successfully if it is free of errors. If there are errors in the source code, the compiler specifies the error at the end of compilation. The errors must be removed before the compiler can successfully compile the source code. The source can be executed a number of times without translating it again.

Compiler Language Translator

Interpreter

The language translator program that translate source code into Machine Code statement by statement is called “Interpreter”. The GW-BASIC translator is examples of Interpreter.

As we see that it translates one statement of source program into Machine Code and executes it immediately before translating the next statement. If there is any error in the statement, the interpreter terminates its translating process at that statement. It also displays an error message.

Main advantage of Interpreter is that it makes easier to detect and correct errors. But is it time consuming process of translating and executing statements one by one. Each time when the program is run, the source code is translated again.

Languages Translators Interpreter

Assembler

The Language translator program that translates the program written in assembly language into Machine Code is called “Assembler”. Many Assemblers are used to translate source code written in assembly language to machine code or binary code or object code.

  • TASM (Turbo Assembler)
  • NASM (Netwide Assembler)
  • MASM (Macro Assembler)

Post a Comment

Previous Post Next Post