Differentiate between Compilers, assembler and translator. Explain their working and the situations where each is useful.

They're computer code that interprets program written in high level language to machine language. Compilers are advanced programs.


They're computer code that interprets programs written in programming language to machine language.


Translators are computer code than will convert programs written in one language to a different language. Compilers, interpreters, assemblers etc. are example of translators.

Compilers use several phases for conversion. They are:-

LEXICAL ANALYSIS: Checking for invalid symbols in program.

SYNTAX ANALYSIS: Checking validity of syntax used.

CODE GENERATION: Convert every statement to equivalent machine language.

CODE OPTIMIZATION: Generated code is analyzed for redundancy and best code is generated.

Assemblers typically uses 2 or 3 phases (passes) for changing programming language program to machine language program. within the initial pass, macro calls are swollen. within the second pass forward references are resolved and within the third pass actual machine language generation is finished.

Once computer code is developed victimization high level languages, compilers are essential for translation. Similarly, assemblers are needed for translation in places wherever programs are developed in programming language.

Post a Comment


  1. The way you write, you are really a professional blogger,for more information Click here