Types And Differences Of Language Processors Or Translators In Programming

FAST DOWNLOADads
Download
Q. Define Language processor or Translator. Explain different types of Language processors.

Language Processors / Translator

        Computer directly understands machine language only. Machine language is called the native language of computer. Machine language is in binary form that is its instructions consists of strings of zeros and ones. 

       A kegiatan written in high-level or assembly language cannot be run on a computer directly. Firstly, it is converted into machine language. So there is a need to translate the source kegiatan into object code for a computer to execute it. 

Definition of Language Processor 

Language processor or translator may be defined as a software that converts source programs into object program. Therefore, a language translator software will take a source program(that cannot be understood by computer) as input and then will convert it into object code(that can be understood by computer).

Different types of language processors are:

  1.     Compilers
  2.     Interpreters
  3.    Assemblers

 Define Language processor or Translator Types and Differences of Language Processors or Translators in Programming

Compiler

           A compiler is a kegiatan that converts the source kegiatan into object program(machine code) as a whole. The compiler converts source kegiatan in machine code called object program. Compiler also checks and reports syntax errors in the program. A source kegiatan containing an error cannot be compiled.
        A kegiatan written in high-level language is called source program. A kegiatan in machine language is called Object program.
For example, C language and COBOL uses compiler. The function of a compiler is shown in the figure above.


Interpreter


 Define Language processor or Translator Types and Differences of Language Processors or Translators in Programming

An interpreter is a kegiatan that converts one statement of a kegiatan into machine code at one time. Then translated instruction is executed. If there is an error in the statements, the interpreter displays an errors message. In other words we can say that interpreter is a software that translates an instruction into a machine language and gets executed it before proceeding to the next instruction.
The advantage of interpreters over compilers is that an error is found immediately. The disadvantage of interpreter is that it is not very efficient. It does not create object file. So every time we execute the source program, it is translated again one instruction at a time. Whereas compiler creates an object code file. So next time when the kegiatan is executed, this object kegiatan is run( and no translation or compilation is needed unless we change the source code). Visual Basic uses interpreter normally and it can use compiler also when we wish to make .EXE file of a visual basic project.


Assembler

An assembler is a translating kegiatan that translates the instructions of a kegiatan written in assembly language into machine language.
Therefore, Assemblers are used for translating assembly language programs into machine code.


You would also like to read:

Difference between Compiler and  Interpreter

FAST DOWNLOADads
Download
Next Post Previous Post
No Comment
Add Comment
comment url