Thursday 5 May 2022

Programming Language Translator

 A programming language translator is a software that translate computer program (instructions) written in some specific programming language into another programming language. A program written in high level language is called source code. To convert the source code into machine code, translators are needed.

There are three types of programming language translator –

  1. Compliers
  2. Interpreters 
  3. Assemblers  
  4. Linker and Loader
Compliers 

Compiler is a translator which is used to convert programs in high level langue to low level language. It translates the entire program that is group of statements at a time and also reports the errors in source program encountered during the translation.


Interpreters 


Interpreter is a translator which is used to convert programs in high level language to low level language. Interpreter translates line by line statements and reports the error once it encountered during the translation process. It gives better error diagnostics than a compiler. 


Assemblers 


Assembler is a translator which is used to translate the assembly language code into machine language code.


Linker and Loader 

Linker is a computer program that links and merges various object files together in order to make an executable file. All these files might have been compiled by separate assembler. The major task of a linker is to search and locate referenced module/routines in a program and to determine the memory location where these codes will be loaded making the program instruction to have absolute reference. 

Loader is a part of operating system and is responsible for loading executable files into memory and executes them.


It calculates the size of a program (instructions and data) and cerates memory space for it. It initializes various registers to initiate execution.


Differentiate between Compiler and Interpreter




Popular Posts