Programming Language Translators

 Programming Language Translators


What is the need of programming language translators?

Programming language translators are needed to translate high-level program to a machine language program, because computers can only understand machine language(Zeros and Ones) where as  high-level programming languages are written in more human friendly manner (machine-independent manner).

Types of programming language translators

  • Compiler
  • Interpreter
  • Assembler

Compiler

It converts the whole high-level program at once and any errors will be reported after the conversion. Also it saves a file containing machine code which can be executed and run on any operating system without the compiler.


Interpreter 

It is also a high-level programming translator which converts program line-by-line and will output any errors detected while converting. Interpreter is faster than the compiler since it immediately executes the code upon reading the code. 



Contrast between interpreter and compiler

Assembler

It converts the assembly language programs to machine language, unlike compiler and interpreter this translates low-level language(assembly language) to the machine code.

Comments