Call Girls in Faridabad 9000000000 Faridabad Escorts Service
Compiler vs interpreter
1. Guided by:-
Mrs. Pragna Makwana
INFORMATION TECHNOLOGY
(5th SEMESTER)
SYSTEMPROGRAMMING
Prepared by:-
Patel Paras (140500116024)
Patel Pranay (140500116026)
Shah Vidhi (140500116036)
2. What is Compiler?
🠶 A compiler is a piece of code that translates the high level
language into machine language.
🠶 When a user writes a code in a high level language such as Java
and wants it to execute, a specific compiler which is designed for
Java is used before it will be executed.
🠶 The compiler scans the entire program first and then translates it
into machine code which will be executed by the computer
processor and the corresponding tasks will be performed.
3. 🠶 Shown in the figure is basic outline of the compilation process, here program
written in higher level language is known as source program and the converted
one is called object program.
5. Compiler code
🠶 Here is a compiler code example that
run “HELLO WORD”
🠶 If you create any error in code then
out not found or get error message.
6. What is interpreter?
🠶 Interpreters are not much different than compilers. They also convert
the high level language into machine readable binary equivalents.
🠶 Each time when an interpreter gets a high level language code to be
executed, it converts the code into an intermediate code before
converting it into the machine code.
🠶 Each part of the code is interpreted and then execute separately in a
sequence and an error is found in a part of the code it will stop the
interpretation of the code without translating the next set of the codes.
7. 🠶 Outlining the basic working of the interpreter the above figure shows that first a
source code is converted to an intermediate form and then that is executed by the
interpreter.
9. COMPILER vs
INTERPRETER
🠶 A Compiler and Interpreter both carry out the same purpose –
convert a high level language (like C, Java) instructions into the
binary form which is understandable by computer hardware.
🠶 They are the software used to execute the high level programs
and codes to perform various tasks.
🠶 Specific compilers/interpreters are designed for different high
level languages. However both compiler and interpreter have
the same objective but they differ in the way they accomplish
their task i.e. convert high level language into machine language.
10. No. COMPILER INTERPRETER
1. Based on language translation
linking-loading model.
Based on Interpretation Method.
2. Generate a target output program
as an output which can be run
independently from the source
program.
Do not generate any output program ,
they evaluate the source program at
each time for execution.
3. Program execution is separate from
compilation and performed only
after the entire output program is
produced.
Program Execution is a part of
Interpretation and is performed on a
statement-by-statement basis.
4. Target program execute
independently and does not need
the presence of compiler in the
memory.
The interpreter exist in the memory
during interpretation.
11. N
o.
COMPILER INTERPRETER
5. Do not generate output program , If
any is occurred.
It can evaluate & execute program
statement until an error is found.
6. Need recompilation for generating
output program in target language
after each modification in the source
program.
Interpreter is independent of program
modification issues as it processes the
source program each time during
execution.
7. Suitable for Production Environment. Suitable for program development
environment.
8. Bounded to specific target machine
and cannot be ported.
Can be made portable by carefully
coding them in a higher level language.
9. C and C++ are example of
programming language that use
compilation model.
Visual Basic , LISP and MATLAB use
Interpreter.