Difference between Compiler and Interpreter.
To gain complete knowledge about compilers and interpreters, you must know the main differences between them. Also need to know about assembler. These are given below:
Compiler:
1. Translates the entire program together.
2. The compiler works fast.
3. It displays all errors together.
4. The compiler takes more time to eliminate mistakes.
5. It Requires more space in the main memory to operate.
6. Compiler Mostly used in large computers.
7. After converting the program through the compiler it is converted into full machine language. This is called an object program.
8. In this case, there is no need to compile the second time after the first time compiling.
Interpreter:
1. The Interpreter translates line by line.
2. Interpreter works slowly.
3. It displays errors on each line and stops when the error is found.
4. The interpreter works fast in eliminating errors.
5. It requires less space in the main memory.
6. The Interpreter is more commonly used in smaller computers.
7. After converting the program through the interpreter, it reaches an intermediate position. This is called intermediate code.
8. Reconversion is required in the case of the interpreter.
Advantages and Disadvantages of Assembler:
Advantages of assembler:
1. Converts mnemonic code to machine language.
2. As soon as the error is found in the program, it displays them.
3. Correcting program errors is easy.
4. Debugging and testing is fast.
5. Takes less space in memory.
Disadvantages of assembler:
Program execution takes much longer, about 5 to 25 times longer than the compiler.
0 Comments