Language Translators
Computers only understand machine code (binary) this
is an issue because programmers prefer to use a variety of high level and low
level programming language instead. The high-level and low-level code (source
code) needs to pass through a translator. A translator is a program which
converts the source code into machine code (object code). There are different
types of translator programs each able to perform different disks.
1. Compiler:
Compilers are language translators used
to translate a program written in a high-level language into machine code
(object code). Once compiled the translated program file can then be directly
used by the computer and is independently executable. Compiling may take some
time but the translated program can be used again and again without the need
for recompilation. An error report is often produced after the full program has
been translated. The translator of C is an example of compiler.
2.Interpreter:
Interpreters are language translator able to read, translate and execute one statement at a time from a high-level language. The interpreters stops when a line of code is reached that contains an error. Interpreters are often used during the development of a program. They make debugging easier as each line of code is analyzed and checked before execution. The translator of BASIC is an example of interpreter.
3. Assembler:
Assemblers are used to translate a program written in a low level assembly language into a machine code (object code) file so it can be used and executed by the computer. Once assembled, the program file can be used again and again without re-assembly. The translator of pseudo assembly is an example of assembler.
Comparisons of language translators
Compiler |
Interpreter |
Assembler |
Translates high-level languages into machine code.
|
Temporarily executes high-level languages, one
statement at a time. |
Translates low-level assembly code into machine
code. |
An executable file of machine code (object code)
is produced |
No executable file of machine code (object code)
is produced |
An executable file of machine code (object code)
is produced. |
Compiled programs no longer need the compilation. |
Interpreted programs cannot be used without the
interpreter. |
Assembled programs no longer need the assembler. |
Error report is produced once entire program is
compiled. |
Error messages produced immediately and program stops at that point. |
One low-level language statement is usually
translated into one machine code instruction. |
2 Comments
wow new theme once more
ReplyDeletekeeep it upppp
Table layera lekhechhunu bhachha thik hoo yrr
ReplyDeletedami
Any queries ! check out here