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

COMPILERS: They are software that translates program written in high level language to machine language. Compilers are complex programs.

ASSEMBLERS: They are software that translates programs written in assembly language to machine language.

TRANSLATOR: Translators are software than can convert programs written in one language to another language. Compilers, interpreters, assemblers etc. are example of translators.

Compilers use many phases for conversion. They are:-

LEXICAL ANALYSIS: Checking for invalid symbols in program.

SYNTAX ANALYSIS: Checking validity of syntax used.

CODE GENERATION: Convert each statement to equivalent machine code.

CODE OPTIMISATION: Generated code is analyzed for redundancy and optimal code is generated.

Assemblers usually uses two or three phases (passes) for converting assembly language program to machine language program. In the first pass, macro calls are expanded. In the second pass forward references are resolved and in the third pass actual machine code generation is done.

Once software is developed using high level languages, compilers are essential for translation. Similarly, assemblers are required for translation in places where programs are developed in assembly language.

7 comments:

  1. That is an extremely smart written article. I will be sure to bookmark it and This article is efficient. Thank you for sharing it with us. I am visiting this blog on a daily basis and I am finding so much helpful article each time. Keep working on this and thank you once again...

    www.mixresult.com, a new-generation Mix education result news portal, publishes update result news from a highly interactive platform.

    www.mixresult.com

    ReplyDelete
  2. The is amazing post. I like this so much. The Custom essay writing service is my writing service. We are making the essays, and more types of writing papers for the students.

    ReplyDelete
  3. I have managed to use different compilers but I have not yet used all the compilers. This blog has given very clear guidelines on the types of compilers which can be used in this era. I have gotten the chance to even discover new compilers and this has helped me a lot. Text Citations Revising Help

    ReplyDelete