Difference between Compare Compiler, Assembler and Interpreter. Simple Language
Compiler and Interpreter translate high-level language program into machine language Difference between Compare Compiler, Assembler and Interpreter.
Compare Compiler, Assembler and Interpreter.
Following are the differences between compiler, assembler and interpreter-
(1) Compiler and Interpreter translate high-level language program into machine language, while assembler converts low-level language or assembly language program into machine language.
(2) The compiler translates all the instructions of the high-level language program into machine language at once, while the interpreter converts each instruction of the program into machine language and executes it one by one. and the assembler converts mnemonic code and hexadecimal values of instructions into object code.
(3) Interpreter also executes each instruction by converting it into machine language. That's why the execution of the program also happens at the time of translation, whereas this does not happen in compiler and assembler.
(4) Like the compiler, the interpreter does not even create an object program in the memory of the source program, because it executes it along with translating each line or instruction.
If there is an error in any instruction, the interpreter indicates it immediately, from which the programmer corrects it, only after that it executes it again by converting it into machine language. Thus finding errors is easy with the help of interpreter, while compiler displays all the errors of the entire program at once, it takes more time for debugging.
(5) Compiler takes more time to execute the program than interpreter and assembler takes more time than both of them.
Also does this work in less time.
(6) Interpreter occupies less space in memory than compiler.
(7) Compiler is used in high level languages like C, C++, COBOL, FORTRAN etc. Assembler is used only for assembly language and Interpreter is used in BASIC and PASCAL higher language.
Join the conversation