subject: CS-603
UMAR IJAZ
2017-AG-7929
UAF SUB CAMPUS TTS
TOPICS;
COMPILER
WHY WE USE COMPILER
HOW WE USE COMPILER
INTERPRETER
ASSEMBLER
COMPILER
compiler is a computer program
translates computer code written in
one programming,language
(the source language) into another language
(the target language).
The name "compiler" is primarily used for
programs that translate source code from a
high-level programming language to low-
level language
Why we use compiler
Because computer can't understand the source
code directly. It will understand only object level
code.
Source codes are human readable format but the
system cannot understand it.
the compiler is intermediate between human
readable format and machine-readable format.
How we use compiler
When you run a compiler on your code, first, the
preprocessor reads the source code.
The preprocessor searches for any preprocessor
directives (lines of code starting with a #
the compiler works through the preprocessed
code line by line translating each line into the
appropriate machine language instruction.
interpreter
interpreter is used to directly execute program
instructions written using one of the many high-
level programming Lang.
interpreter transforms the high-level program
into an intermediate language.
which is done line by line or statement by
statement.
Faster debugging
More run time
Assembler
An assembler is a program that converts
assembly language into machine code.
Assemblers are similar to compilers in that they
produce executable code.
assembling a program is performed using a simple
one-to-one mapping