DIFFERENCE BETWEEN INTERPRETER AND A COMPILER – Both the interpreter and the compiler do the work of an interpreter, that is, they translate a high level of language into a computer-understood machine language.

But there are many differences in the way the two work. In a small computer, the interpreter is permanently attached to the other electrical circuits of the computer.

The compiler, however, is usually stored on a floppy disk. It is stored in the computer’s memory whenever necessary.


The compiler is given a high-level language source program, which first converts all that program into an object program, that is, into machine language.

The interpreter does not do that. It reads every sentence in a high-language program, ie instructions, and translates only that sentence into machine language, and then immediately executes that sentence.

If an interpreter is used in this way, each line is converted into machine language while all the programs are being implemented as instructed.

Since the interpreter, like the compiler, does not generate programs in the entire machine language at the same time, of course, it consumes much less computer memory than the compiler.

Basic languages ​​use interpreters rather than compilers. That’s why she needs less computer memory. Not so with languages ​​like FORTRAN, COBOL.

Their translation into machine language depends on the compiler. The compiler is also a bit difficult to handle. Basic is another important reason why the language is so popular.

Although the printer is easy to use, it has some disadvantages. The speed and efficiency of the compiler is much higher than that of the interpreter.

Because the object program created by the compiler is completely in machine language, it can be executed quickly.

On the contrary, the interpreter converts each line into a machine language before implementing any instructions.

Of course, it takes him a long time to implement all the programs. An intelligent student frees himself by solving all the mathematical terms in his mind, putting his answers on a piece of paper.

Once the compiler creates an object program, it can be stored permanently on a floppy disk. For that particular program, you don’t have to re-translate into machine language.

Give the computer that program and new data that you get the answer in a moment. The interpreter, however, has to translate each line over and over again.

Although the interpreter’s efficiency and speed are low, it is very convenient to use. That is why interpreters have recently become available for languages ​​like FORTRAN, COBOL, etc.