What is Language Translator?
Language translator is one kinds of software which is used to convert human understandable language into machine understandable language. Each programming language used one language translator. There are three different types of language translator they are:
1. 1..Assembler:
An assembler is a translator that converts code of assembly language into machine language. The resulting program can be executed only when the assembly process is completed. In assembly language computer has to run the assembler, first it translated the assembly language(source code) into its equivalent machine language(object code), and then execute the object code to get result.
2. Compiler:
A compiler is a translator which translates a high level language(source code) into machine level language at once. This is faster for translating program but complex for debugging. In compiler, syntax error is detected after the compilation of complete program. This complete translation process is called compilation.
3.
Interpreter:
An interpreter is a translator which translates high level language into a machine level language, one line at a time and executes line of the program after it has been translated. Since, the interpreter needs to evaluate the program letter by , then word by word , and then line by line, its speed is incredibly slow. In interpreter , syntax errors can be trapped before translation of every line.
-Difference
between compiler and interpreter :
|
Compiler |
Interpreter |
|
It convert whole
program in high level language into machine understandable language at once. |
It convert high
level language into machine level language at step by step and line by line. |
|
The executable
program is stored in a disk for future use or to run it in another computer. |
The executable program
is generated in RAM and the interpreter is required for each run of the
program. |
|
Compiler process is
faster than interpreter. |
It is slower than
compiler. |
|
It finds out error
after compiling the whole program. |
It finds out error
at step by step. |
|
C,C++, c# etc are
used in compiler. |
BASIC,QBASIC etc
are used in interpreter. |







0 comments:
Post a Comment