POP Unit 3 Assembler_Compiler_Interpreter
POP Unit 3 Assembler_Compiler_Interpreter
Assembler
An assembler is a special type of software that
converts assembly language code into machine code
which is easily understandable by computer to
execute.
Compiler
A compiler is a special software that translates
high-level programming language code (like C++ or
Java) into machine code, which is the binary code
(0s and 1s).
Interpreter
- interpreter is a translator which translates
and executes instructions line by line.
- when there is syntax error in one line, the
translation is stopped and rest of the
statements are not translated.
- It immediately translates each line into
machine code and executes it before moving on
to the next line.
- interpreter required to translate every time
before execution because interpreter
doesn't store translated code.
- It doesn’t provide object code.
Object Code vs Machine Code
1. Execution
Machine code can be executed directly by the
CPU, while object code usually needs to be
linked before it can be executed.
2. Format
Machine code is binary code, while object code
is usually packaged in an executable format.
Task:
1. Difference b/w Compiler and Interpreter.