SlideShare a Scribd company logo
1 of 16
A presentation on
Compiler and Interpreter
Presented by
Compiler and Interpreter
 It is important to understand the comparison
between interpreter and compiler as it helps to
understand the working of a program in a better
way.
 There are some programming languages like C and
C++ that requires only a compiler whereas some
such as PHP and python requires only an
interpreter.
 However, there are some programming languages
such as Java, Haskell and Ocaml which make use
both of compiler and Interpreter.
Why Compiler and Interpreter?
The computers understand only binary digits – 1 and 0.
Therefore, we can communicate with the computers only
using 1s and 0s. However, it is very difficult for humans to
communicate using binary digits.
These compiler and interpreter programs help us in
communicating with the computer systems by converting
the high-level language or source code (which is normally
written in English language using C, C++, Java and other
such programming languages) into low-level language or
machine code which consists of only 1 and 0 that is in binary
format.
Compiler:
A compiler is a translator program that converts a source
code into an object code. The source code is normally written
in C, C++, etc. and it is translated into a binary format which is
often known as an object code.
A compiler converts the complete source code into object
code at once. It takes the complete program code as its input.
This is one of the most important and basic difference between
compiler and interpreter.
The process of translating a source code into machine code
(object code) is faster using a compiler as compared to an interpreter as it
translates the complete source code at once.
A compiler generates errors and warnings only after the compilation process is
completed. It is, therefore, difficult to debug and sort out errors in a program
since the complete source code needs to be checked, unlike an interpreter.
A compiler supports only static memory allocation and does not support
dynamic memory allocation.
The programming languages that use compilation
are C, C++, COBOL, ALGOL, BASIC, Go, Haskell, Java, etc.
 A compiler performs different tasks such as:
A compiler performs different tasks such as:
 Code generation
 Code optimization
 Semantic analysis
 Pre – processing
 Parsing
There are different types of compilers such
as:
 Source – to – source compiler
 Just – in – time compiler
 Hardware compiler
 Byte code compiler
Interpreter:
An interpreter takes in only a single statement of instruction as an
input and translates it into object or machine level code. An
interpreter program parses an instruction and executes it’s
immediately.
The interpreted program executes comparatively slower than
compiled program as it checks and interprets every single
statement one by one every time it is executed making it a very
time-consuming process.
However, an interpreter is much more memory efficient than a
compiler since it takes in only a line of instruction as compared to
the complete source code.
An interpreter converts the source code line by line into an intermediate
representation and executes its behavior directly.
An interpreter generates errors and warnings line by line, if there are any. It
does not generate an error after interpreting the whole program making it
more user-friendly.
An interpreter, therefore, makes debugging the source code much easier as
it shows the errors line by line.
An interpreter supports dynamic memory allocation and it does not
support static memory allocation.
The programming languages that use interpreters are
BASIC, C, Pascal, Python, PHP, Java, LISP etc.
An interpreter uses the following techniques:
 Parser
 Lexical Analysis
There are different types of
interpreters such as:
 Byte code interpreter
 Self – interpreter
 Abstract syntax tree interpreter
 Threaded code interpreter
Difference between Compiler and Interpreter
COMPILER INTERPRETER
 A compiler translates the
complete source code at once.
 A compiler only translates or
converts the source code into
machine code.
 The compilation result cannot be
viewed during the course of
translating the source code into
object code.
 The process of converting the
source code into machine level
code using a compiler is faster.
 Compilation process requires
comparatively more memory as
the object code is generated.
 The compiler requires less
time for execution.
 An interpreter translates the
source code line by line.
 An interpreter directly executes
the given instruction without
compiling them.
 The interpreter results can be
viewed at the translation time
since it translates the source
code line by line.
 The process of converting the
source code into low-level
machine code is slower.
 Interpreters consume less
amount of memory than a
compiler.
 An interpreter takes too
much amount of time when
compared to a compiler.
COMPILER
 A compiler supports a static
allocation of memory.
 A compiler, therefore, takes
the complete programs an
input.
 An intermediate level code
is generated during
compilation.
 The compiler finds and lists
the errors within the
complete program at once.
 A compiler generates
intermediate object code
which makes it less
memory efficient.
INTERPRETER
 An interpreter
supports dynamic
allocation of memory.
 An interpreter takes only
a single instruction as its
input.
 No intermediate level code
is not generated during
compilation.
 An interpreter finds and
lists the errors after
interpreting every single
statement.
 An interpreter does not
generate intermediate
object code making it more
memory efficient.
COMPILER INTERPRETER
 The compiled code
is difficult to debug.
 A compiler does not
support dynamic memory
allocation technique.
 Example: PHP, Python,
Ruby, etc.
 Programming languages
that support compilation
are C, C++, Java, C#, etc.
 Interpretation process
makes it easier to
debug the source code.
 An interpreter does not
support static memory
allocation technique.
 Example: java, GCC,
clang, go, etc.
 Programming languages
that support
interpretation are PHP,
Ruby, .NET, Python,
MATLAB, Perl, BASIC, etc.
Reference:
www.codingalpha.com/
Thank you

More Related Content

What's hot

Compliers and interpreters
Compliers and interpretersCompliers and interpreters
Compliers and interpretersshivasdhtsvmic
 
Compiler design tutorial
Compiler design tutorialCompiler design tutorial
Compiler design tutorialVarsha Shukla
 
Introduction to compiler development
Introduction to compiler developmentIntroduction to compiler development
Introduction to compiler developmentDeepOad
 
compiler and their types
compiler and their typescompiler and their types
compiler and their typespatchamounika7
 
Features of machine language, assembly language, high level language & their ...
Features of machine language, assembly language, high level language & their ...Features of machine language, assembly language, high level language & their ...
Features of machine language, assembly language, high level language & their ...SHUBHAM PATIDAR FISHERIES ADDAA
 
Assembly and Machine Code
Assembly and Machine CodeAssembly and Machine Code
Assembly and Machine CodeProject Student
 
Programming languages
Programming languagesProgramming languages
Programming languagesgaurav jain
 
Language translator
Language translatorLanguage translator
Language translatorSumitSumit26
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction Sarmad Ali
 
Programming language
Programming languageProgramming language
Programming languageRajThakuri
 
basics of compiler design
basics of compiler designbasics of compiler design
basics of compiler designPreeti Katiyar
 
unit1pdf__2021_12_14_12_37_34.pdf
unit1pdf__2021_12_14_12_37_34.pdfunit1pdf__2021_12_14_12_37_34.pdf
unit1pdf__2021_12_14_12_37_34.pdfDrIsikoIsaac
 

What's hot (20)

Assembler
AssemblerAssembler
Assembler
 
Compliers and interpreters
Compliers and interpretersCompliers and interpreters
Compliers and interpreters
 
Compiler design tutorial
Compiler design tutorialCompiler design tutorial
Compiler design tutorial
 
Introduction to compiler development
Introduction to compiler developmentIntroduction to compiler development
Introduction to compiler development
 
compiler and their types
compiler and their typescompiler and their types
compiler and their types
 
Interpreter
InterpreterInterpreter
Interpreter
 
Features of machine language, assembly language, high level language & their ...
Features of machine language, assembly language, high level language & their ...Features of machine language, assembly language, high level language & their ...
Features of machine language, assembly language, high level language & their ...
 
Assembly and Machine Code
Assembly and Machine CodeAssembly and Machine Code
Assembly and Machine Code
 
Translators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreterTranslators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreter
 
Compiler type
Compiler typeCompiler type
Compiler type
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
SD & D High and low level languages
SD & D High and low level languagesSD & D High and low level languages
SD & D High and low level languages
 
COMPILER DESIGN- Introduction & Lexical Analysis:
COMPILER DESIGN- Introduction & Lexical Analysis: COMPILER DESIGN- Introduction & Lexical Analysis:
COMPILER DESIGN- Introduction & Lexical Analysis:
 
Language translator
Language translatorLanguage translator
Language translator
 
Types of Compilers
Types of CompilersTypes of Compilers
Types of Compilers
 
Lession 6
Lession 6Lession 6
Lession 6
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction
 
Programming language
Programming languageProgramming language
Programming language
 
basics of compiler design
basics of compiler designbasics of compiler design
basics of compiler design
 
unit1pdf__2021_12_14_12_37_34.pdf
unit1pdf__2021_12_14_12_37_34.pdfunit1pdf__2021_12_14_12_37_34.pdf
unit1pdf__2021_12_14_12_37_34.pdf
 

Similar to Presentation

COMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONSCOMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONSsonalikharade3
 
Language processing system.pdf
Language processing system.pdfLanguage processing system.pdf
Language processing system.pdfRakibRahman19
 
Computer assignment for grade 9
Computer assignment for grade  9Computer assignment for grade  9
Computer assignment for grade 9nahomyitbarek
 
Chapter 2 Program language translation.pptx
Chapter 2 Program language translation.pptxChapter 2 Program language translation.pptx
Chapter 2 Program language translation.pptxdawod yimer
 
compilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdfcompilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdfHarshaVardhan196987
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreterParas Patel
 
Insight into progam execution ppt
Insight into progam execution pptInsight into progam execution ppt
Insight into progam execution pptKeerty Smile
 
Chapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdfChapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdfDrIsikoIsaac
 
Introduction to Compilers
Introduction to CompilersIntroduction to Compilers
Introduction to CompilersAkhil Kaushik
 
COMPUTER ORGANIZATION.pptxbkobuujghuujjj
COMPUTER ORGANIZATION.pptxbkobuujghuujjjCOMPUTER ORGANIZATION.pptxbkobuujghuujjj
COMPUTER ORGANIZATION.pptxbkobuujghuujjjAnujyotiDe
 
Life cycle of a computer program
Life cycle of a computer programLife cycle of a computer program
Life cycle of a computer programAbhay Kumar
 
Pros and cons of c as a compiler language
  Pros and cons of c as a compiler language  Pros and cons of c as a compiler language
Pros and cons of c as a compiler languageAshok Raj
 
Computer languages
Computer languagesComputer languages
Computer languagesPrince Arsal
 
single pass compiler and its architecture
single pass compiler and its architecturesingle pass compiler and its architecture
single pass compiler and its architecturenoor ul ain
 
Phases of Compiler.pptx
Phases of Compiler.pptxPhases of Compiler.pptx
Phases of Compiler.pptxssuser3b4934
 
Compiler Design Introduction
Compiler Design Introduction Compiler Design Introduction
Compiler Design Introduction Thapar Institute
 

Similar to Presentation (20)

COMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONSCOMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONS
 
COMPILER DESIGN.docx
COMPILER DESIGN.docxCOMPILER DESIGN.docx
COMPILER DESIGN.docx
 
Language processing system.pdf
Language processing system.pdfLanguage processing system.pdf
Language processing system.pdf
 
Computer assignment for grade 9
Computer assignment for grade  9Computer assignment for grade  9
Computer assignment for grade 9
 
Chapter 2 Program language translation.pptx
Chapter 2 Program language translation.pptxChapter 2 Program language translation.pptx
Chapter 2 Program language translation.pptx
 
compilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdfcompilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdf
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
 
Insight into progam execution ppt
Insight into progam execution pptInsight into progam execution ppt
Insight into progam execution ppt
 
Compiler vs interpreter
Compiler vs interpreter Compiler vs interpreter
Compiler vs interpreter
 
Chapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdfChapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdf
 
Introduction to Compilers
Introduction to CompilersIntroduction to Compilers
Introduction to Compilers
 
COMPUTER ORGANIZATION.pptxbkobuujghuujjj
COMPUTER ORGANIZATION.pptxbkobuujghuujjjCOMPUTER ORGANIZATION.pptxbkobuujghuujjj
COMPUTER ORGANIZATION.pptxbkobuujghuujjj
 
compiler vs interpreter
compiler vs interpretercompiler vs interpreter
compiler vs interpreter
 
Life cycle of a computer program
Life cycle of a computer programLife cycle of a computer program
Life cycle of a computer program
 
Chapter1.pdf
Chapter1.pdfChapter1.pdf
Chapter1.pdf
 
Pros and cons of c as a compiler language
  Pros and cons of c as a compiler language  Pros and cons of c as a compiler language
Pros and cons of c as a compiler language
 
Computer languages
Computer languagesComputer languages
Computer languages
 
single pass compiler and its architecture
single pass compiler and its architecturesingle pass compiler and its architecture
single pass compiler and its architecture
 
Phases of Compiler.pptx
Phases of Compiler.pptxPhases of Compiler.pptx
Phases of Compiler.pptx
 
Compiler Design Introduction
Compiler Design Introduction Compiler Design Introduction
Compiler Design Introduction
 

Recently uploaded

Hifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun TonightHifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun TonightKomal Khan
 
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /WhatsappsBeautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsappssapnasaifi408
 
威廉玛丽学院毕业证学位证成绩单-安全学历认证
威廉玛丽学院毕业证学位证成绩单-安全学历认证威廉玛丽学院毕业证学位证成绩单-安全学历认证
威廉玛丽学院毕业证学位证成绩单-安全学历认证kbdhl05e
 
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCRReal Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCRdollysharma2066
 
vip Krishna Nagar Call Girls 9999965857 Call or WhatsApp Now Book
vip Krishna Nagar Call Girls 9999965857 Call or WhatsApp Now Bookvip Krishna Nagar Call Girls 9999965857 Call or WhatsApp Now Book
vip Krishna Nagar Call Girls 9999965857 Call or WhatsApp Now Bookmanojkuma9823
 
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一ss ss
 
专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degreeyuu sss
 
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up NumberCall Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up NumberMs Riya
 
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一diploma 1
 
Papular No 1 Online Istikhara Amil Baba Pakistan Amil Baba In Karachi Amil B...
Papular No 1 Online Istikhara Amil Baba Pakistan  Amil Baba In Karachi Amil B...Papular No 1 Online Istikhara Amil Baba Pakistan  Amil Baba In Karachi Amil B...
Papular No 1 Online Istikhara Amil Baba Pakistan Amil Baba In Karachi Amil B...Authentic No 1 Amil Baba In Pakistan
 
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一Fi sss
 
Call Girls In Paharganj 24/7✡️9711147426✡️ Escorts Service
Call Girls In Paharganj 24/7✡️9711147426✡️ Escorts ServiceCall Girls In Paharganj 24/7✡️9711147426✡️ Escorts Service
Call Girls In Paharganj 24/7✡️9711147426✡️ Escorts Servicejennyeacort
 
Alambagh Call Girl 9548273370 , Call Girls Service Lucknow
Alambagh Call Girl 9548273370 , Call Girls Service LucknowAlambagh Call Girl 9548273370 , Call Girls Service Lucknow
Alambagh Call Girl 9548273370 , Call Girls Service Lucknowmakika9823
 
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一ga6c6bdl
 
(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一C SSS
 
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...srsj9000
 
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...Amil baba
 
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...ttt fff
 
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degreeyuu sss
 

Recently uploaded (20)

Hifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun TonightHifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun Tonight
 
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /WhatsappsBeautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
 
威廉玛丽学院毕业证学位证成绩单-安全学历认证
威廉玛丽学院毕业证学位证成绩单-安全学历认证威廉玛丽学院毕业证学位证成绩单-安全学历认证
威廉玛丽学院毕业证学位证成绩单-安全学历认证
 
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCRReal Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
 
vip Krishna Nagar Call Girls 9999965857 Call or WhatsApp Now Book
vip Krishna Nagar Call Girls 9999965857 Call or WhatsApp Now Bookvip Krishna Nagar Call Girls 9999965857 Call or WhatsApp Now Book
vip Krishna Nagar Call Girls 9999965857 Call or WhatsApp Now Book
 
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
 
专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
 
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up NumberCall Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
 
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
 
Papular No 1 Online Istikhara Amil Baba Pakistan Amil Baba In Karachi Amil B...
Papular No 1 Online Istikhara Amil Baba Pakistan  Amil Baba In Karachi Amil B...Papular No 1 Online Istikhara Amil Baba Pakistan  Amil Baba In Karachi Amil B...
Papular No 1 Online Istikhara Amil Baba Pakistan Amil Baba In Karachi Amil B...
 
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
 
Call Girls In Paharganj 24/7✡️9711147426✡️ Escorts Service
Call Girls In Paharganj 24/7✡️9711147426✡️ Escorts ServiceCall Girls In Paharganj 24/7✡️9711147426✡️ Escorts Service
Call Girls In Paharganj 24/7✡️9711147426✡️ Escorts Service
 
Alambagh Call Girl 9548273370 , Call Girls Service Lucknow
Alambagh Call Girl 9548273370 , Call Girls Service LucknowAlambagh Call Girl 9548273370 , Call Girls Service Lucknow
Alambagh Call Girl 9548273370 , Call Girls Service Lucknow
 
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
 
(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一
 
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
 
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
 
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
 
young call girls in Khanpur,🔝 9953056974 🔝 escort Service
young call girls in  Khanpur,🔝 9953056974 🔝 escort Serviceyoung call girls in  Khanpur,🔝 9953056974 🔝 escort Service
young call girls in Khanpur,🔝 9953056974 🔝 escort Service
 
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
 

Presentation

  • 1. A presentation on Compiler and Interpreter
  • 3. Compiler and Interpreter  It is important to understand the comparison between interpreter and compiler as it helps to understand the working of a program in a better way.  There are some programming languages like C and C++ that requires only a compiler whereas some such as PHP and python requires only an interpreter.  However, there are some programming languages such as Java, Haskell and Ocaml which make use both of compiler and Interpreter.
  • 4. Why Compiler and Interpreter? The computers understand only binary digits – 1 and 0. Therefore, we can communicate with the computers only using 1s and 0s. However, it is very difficult for humans to communicate using binary digits. These compiler and interpreter programs help us in communicating with the computer systems by converting the high-level language or source code (which is normally written in English language using C, C++, Java and other such programming languages) into low-level language or machine code which consists of only 1 and 0 that is in binary format.
  • 5. Compiler: A compiler is a translator program that converts a source code into an object code. The source code is normally written in C, C++, etc. and it is translated into a binary format which is often known as an object code. A compiler converts the complete source code into object code at once. It takes the complete program code as its input. This is one of the most important and basic difference between compiler and interpreter.
  • 6. The process of translating a source code into machine code (object code) is faster using a compiler as compared to an interpreter as it translates the complete source code at once. A compiler generates errors and warnings only after the compilation process is completed. It is, therefore, difficult to debug and sort out errors in a program since the complete source code needs to be checked, unlike an interpreter. A compiler supports only static memory allocation and does not support dynamic memory allocation. The programming languages that use compilation are C, C++, COBOL, ALGOL, BASIC, Go, Haskell, Java, etc.
  • 7.  A compiler performs different tasks such as: A compiler performs different tasks such as:  Code generation  Code optimization  Semantic analysis  Pre – processing  Parsing
  • 8. There are different types of compilers such as:  Source – to – source compiler  Just – in – time compiler  Hardware compiler  Byte code compiler
  • 9. Interpreter: An interpreter takes in only a single statement of instruction as an input and translates it into object or machine level code. An interpreter program parses an instruction and executes it’s immediately. The interpreted program executes comparatively slower than compiled program as it checks and interprets every single statement one by one every time it is executed making it a very time-consuming process. However, an interpreter is much more memory efficient than a compiler since it takes in only a line of instruction as compared to the complete source code.
  • 10. An interpreter converts the source code line by line into an intermediate representation and executes its behavior directly. An interpreter generates errors and warnings line by line, if there are any. It does not generate an error after interpreting the whole program making it more user-friendly. An interpreter, therefore, makes debugging the source code much easier as it shows the errors line by line. An interpreter supports dynamic memory allocation and it does not support static memory allocation. The programming languages that use interpreters are BASIC, C, Pascal, Python, PHP, Java, LISP etc.
  • 11. An interpreter uses the following techniques:  Parser  Lexical Analysis
  • 12. There are different types of interpreters such as:  Byte code interpreter  Self – interpreter  Abstract syntax tree interpreter  Threaded code interpreter
  • 13. Difference between Compiler and Interpreter COMPILER INTERPRETER  A compiler translates the complete source code at once.  A compiler only translates or converts the source code into machine code.  The compilation result cannot be viewed during the course of translating the source code into object code.  The process of converting the source code into machine level code using a compiler is faster.  Compilation process requires comparatively more memory as the object code is generated.  The compiler requires less time for execution.  An interpreter translates the source code line by line.  An interpreter directly executes the given instruction without compiling them.  The interpreter results can be viewed at the translation time since it translates the source code line by line.  The process of converting the source code into low-level machine code is slower.  Interpreters consume less amount of memory than a compiler.  An interpreter takes too much amount of time when compared to a compiler.
  • 14. COMPILER  A compiler supports a static allocation of memory.  A compiler, therefore, takes the complete programs an input.  An intermediate level code is generated during compilation.  The compiler finds and lists the errors within the complete program at once.  A compiler generates intermediate object code which makes it less memory efficient. INTERPRETER  An interpreter supports dynamic allocation of memory.  An interpreter takes only a single instruction as its input.  No intermediate level code is not generated during compilation.  An interpreter finds and lists the errors after interpreting every single statement.  An interpreter does not generate intermediate object code making it more memory efficient.
  • 15. COMPILER INTERPRETER  The compiled code is difficult to debug.  A compiler does not support dynamic memory allocation technique.  Example: PHP, Python, Ruby, etc.  Programming languages that support compilation are C, C++, Java, C#, etc.  Interpretation process makes it easier to debug the source code.  An interpreter does not support static memory allocation technique.  Example: java, GCC, clang, go, etc.  Programming languages that support interpretation are PHP, Ruby, .NET, Python, MATLAB, Perl, BASIC, etc.