Friday 1 February 2013

LANGUAGE TRANSLATOR

LANGUAGE TRANSLATOR
It is a program that translates a program of high level language or assembly language into machine code.Every computer language has its own translator .Computer understands only machine language.A program written in high level or assembly language cannot be run on a computer directly .It must be converted into machine language before execution
Different types of Language translators are as follows
COMPILER
INTERPRETER
ASSEMBLER
 ---------------------------

COMPILER
                    It is a program that converts the instructions of a high level language into machine language as a whole.A program written in high level language is called source program.The Compiler converts the source program into object program.The compiler checks each statement in the source program and generates  machine instructions .Compiler also checks syntax error in program .A source program having error cannot be compiled.A compiler can translate the programs of only  those languages for which it is written .For example ,Compiler can translate only those programs that are written in C language
----------------------------------
INTERPRETIER
                            An Interpreter is a program that converts one statment of program into machine at one time.It executes a statement before translating the next statement of source program.If there is an error in the statements ,interpreter stops working and displays an error message
The advantage of interpreter over compiler is that an error is found immediately so the programmer can correct errors during program development.The Interpreter does not produce an object program
It must convert the program each time it is executed
--------------------------------------
Assembler
                An assembler is a translating program that translates the instructions of assembly language into machine language

No comments:

Post a Comment