Compiler and Interpreter

Computers understand only 0's and 1's language which is known as Binary language, machine language or low level language. Human beings can understand English type language. Programs which we write are in English type language. The language which we understand is known as high level language. The programs which are written in high level language should be converted into low level language then only computers can understand the program. The translation task is done by program that is called as interpreter or compiler.

Interpreter

Interpreter is a translator which converts the high level language into low level language line by line. It means interpreter converts the high level language instructions into low level language statement by statement. If any error encountered in a line then the interpreter stops conversion there itself. If the error is removed then it resumes the conversion.

Compiler

Interpreter is a translator which converts the high level language into low level language at a time. Compiler converts the high level language program all instructions at a time. At the end of the translation it lists out the errors if present.

Differences Between Compiler and Interpreter

Interpreter Compiler
Conversion is done statement by staement Entire program is converted at a time
Slower than Compiler Faster
Conversion process is stopped if error appears. Conversion is done irrespective of errors.
Easys to implement Complex to implement