Tuesday 22 March 2016

Translators

Translators;
A translator is any program that takes source code and turns it into machine code.
There are three different types of translators:

Compilers:
Both compilers and interpreters will compile source code into machine code. They both have a 1 to many relationship, a single line of source code may become many lines of binary equivalent machine code.
Compilers will take all of the source code and convert it all into machine code, this can take a long time

Advantages:
Disadvantages:
  • All errors need to be fixed before the program can run
  • This way can be very time consuming


Interpreters:
Both compilers and interpreters will compile source code into machine code. They both have a 1 to many relationship, a single line of source code may become many lines of binary equivalent machine code.
An interpreter takes one line of high level source code and convert it directly into machine code and run it

Advantages:
  • Starts running the program immediately
Disadvantages:
  • As all source code is required every time there are security issues.
  • These are slower than compilers


Assemblers:
Assemblers will convert low level assembly code into machine code, usually in a 1 to 1 conversion, one line corresponds to a machine code instruction.

Advantages:
Disadvantages:

Summary of Translators:

 






Compilers Vs Interpreters:


















No comments:

Post a Comment