SlideShare a Scribd company logo
INTRODUCTION TO
PROGRAMMING
Week 2
Topic
•Programming Evolution
•Programming Language Paradigm
•Translators
Programming Language Evolution
1. Machine Language
• Machine language is a collection of binary digits or bits that the
computer reads and interprets.
2. Assembly Language
• Uses symbolic operation code to represent the machine
operation code.
3. High level Language
• Uses English like statements
Programming Language Evolution
• High level language
Example : C++ Add 2 numbers
#include<iostream>
Void main()
{
int a, b, c;
cout <<“Enter two numbers:n”;
cin >>a;
cin >>b;
c = a+b;
cout <<“Sum of 2 numbers is {0}”, c);
}
• Machine Language
Example: check if low-order 4 bits of value in reg 1 = 0
2000 load load zero into reg 0
220F load load string 00001111 into reg 2
8312 AND c(reg 1) AND c(reg 2) —> reg 3 — masking
B3XY JMP jump to address XY if c(reg 3) = c(reg 0)
• Assembly Language
Example : Add 2 numbers
name "add"
mov al, 5 ; bin=00000101b
mov bl, 10 ; hex=0ah or bin=00001010b
add bl, al ; 5 + 10 = 15 (decimal) or hex=0fh or
bin=00001111b
Programming Language Paradigm
• Programming paradigm is a fundamental style of computer programming
• Programming paradigm is an approach to solving programming problems.
• Programming paradigm that describes computation in terms of
statements that change a program state.
• It defines sequences of commands for the computer to perform
• For example,
• X := X+2
• Assignment changes the value at a location.
• A program execution generates a sequence of states
Programming Language Paradigm
Common programming paradigms:
1.Imperative or Procedural Programming
2.Object-Oriented Programming
3.Functional Programming
4.Logic Programming
Programming Language Paradigm
Programming Language Paradigm
1. Imperative or Procedural Programming
• a program is a series of statements containing variables.
• Program execution involves changing the memory contents of the computer
continuously.
• Example of imperative languages are: C, FORTRAN, Pascal, COBOL etc
• Advantages
low memory utilization
relatively efficient
the most common form of
programming in use today.
• Disadvantages
difficulty of reasoning about
programs
difficulty of parallelization.
Tend to be relatively low level
Programming Language Paradigm
2. Object-Oriented Programming
• A program in this paradigm consists of objects which communicate
with each other by sending messages
• Example object oriented languages include: Java, C#, Smalltalk, etc
• Advantages
Conceptual simplicity
Models computation better
Increased productivity
• Disadvantages
Can have a steep learning
curve, initially
Doing I/O can be cumbersome
Programming Language Paradigm
3. Functional Programming
• A program in this paradigm consists of functions and uses functions in a similar way as used in
mathematics
• Program execution involves functions calling each other and returning results. There are no variables
in functional languages
• Example functional languages include: ML, MirandaTM, Haskell
• Advantages
 Small and clean syntax
 Better support for reasoning about programs
 They allow functions to be treated as any other data values.
 They support programming at a relatively higher level than the
imperative languages
• Disadvantages
 Difficulty of doing
input-output
 Functional languages
use more storage space
than their imperative
cousins
Programming Language Paradigm
4. Logic Programming
• A program in the logic paradigm consists of a set of predicates and rules of inference.
Predicates are statements of fact like the statement that says: water is wet.
• Rules of inference are statements like: If X is human then X is mortal.
The predicates and the rules of inference are used to prove statements that the
programmer supplies.
• Example: Prolog
• Advantages
Good support for
reasoning about
programs
Can lead to concise
solutions to problems
• Disadvantages
Slow execution
Limited view of the world
That means the system does not know about facts that are
not its predicates and rules of inference.
Difficulties in understanding and debugging large programs
Translators
• A translator is a computer program that performs the translation
of a program written in a given programming language into
a functionally equivalent program in a different ways computer
language, without losing the functional or logical structure of the
original code (the "essence" of each program)
• Programs must be translated into machine codes before execution
Translators
Types of translator
1. Assembler
2. Compiler
3. interpreter
Translators
1. Assembler
• Assembler is a computer program which is used to translate
program written in Assembly Language in to machine language.
• A program which translates an assembly language program into a
machine language program
• Assembler are used to convert assembly language code into
machine code.
Translators
2. Compiler
• A compiler is a program that translates a programme written in
HLL to executable machine language
• It is a program which translates a high level language program into
a machine language program.
• A compiler is more intelligent than an assembler.
• Compilers are used to convert high level languages (like C, C++ )
into machine code
Translators
3. Interpreter
• Interpreter translates each instruction, executes it and then the
next instruction is translated and this goes on until end of the
program.
• An interpreter is a program which translates statements of a
program into machine code.
• It translates only one statement of the program at a time.
• An interpreter is a computer program which executes a statement
directly (at runtime)

More Related Content

Similar to week 2 - INTRO TO PROGRAMMING.pptx

Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
Gaditek
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
Gaditek
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
C programming
C programmingC programming
C programming
Jigarthacker
 
Compiler an overview
Compiler  an overviewCompiler  an overview
Compiler an overview
amudha arul
 
Programming languages
Programming languages Programming languages
Programming languages
sushma chinta
 
Unit ii
Unit   iiUnit   ii
Unit ii
sathisaran
 
Computer Programming In C.pptx
Computer Programming In C.pptxComputer Programming In C.pptx
Computer Programming In C.pptx
chouguleamruta24
 
INTRODUCTION TO C++, Chapter 1
INTRODUCTION TO C++, Chapter 1INTRODUCTION TO C++, Chapter 1
INTRODUCTION TO C++, Chapter 1
Mubarek Kurt
 
Introduction to programming language (basic)
Introduction to programming language (basic)Introduction to programming language (basic)
Introduction to programming language (basic)
nharsh2308
 
Language processors
Language processorsLanguage processors
Language processors
Dr. B T Sampath Kumar
 
C.pdf
C.pdfC.pdf
Program Logic and Design
Program Logic and DesignProgram Logic and Design
Program Logic and Design
Froilan Cantillo
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
Selvaraj Seerangan
 
1.Overview of Programming.pptx
1.Overview of Programming.pptx1.Overview of Programming.pptx
1.Overview of Programming.pptx
Vishwas459764
 
Compilers.pptx
Compilers.pptxCompilers.pptx
Compilers.pptx
MohammedMohammed578197
 
Programming in C
Programming in CProgramming in C
Programming in C
Rvishnupriya2
 
Programming in c
Programming in cProgramming in c
Programming in c
vishnu973656
 
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Professor Lili Saghafi
 
PPL_Unit01 for the insem study first year.pptx
PPL_Unit01 for the insem study first year.pptxPPL_Unit01 for the insem study first year.pptx
PPL_Unit01 for the insem study first year.pptx
rockstarr066gj
 

Similar to week 2 - INTRO TO PROGRAMMING.pptx (20)

Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
 
C programming
C programmingC programming
C programming
 
Compiler an overview
Compiler  an overviewCompiler  an overview
Compiler an overview
 
Programming languages
Programming languages Programming languages
Programming languages
 
Unit ii
Unit   iiUnit   ii
Unit ii
 
Computer Programming In C.pptx
Computer Programming In C.pptxComputer Programming In C.pptx
Computer Programming In C.pptx
 
INTRODUCTION TO C++, Chapter 1
INTRODUCTION TO C++, Chapter 1INTRODUCTION TO C++, Chapter 1
INTRODUCTION TO C++, Chapter 1
 
Introduction to programming language (basic)
Introduction to programming language (basic)Introduction to programming language (basic)
Introduction to programming language (basic)
 
Language processors
Language processorsLanguage processors
Language processors
 
C.pdf
C.pdfC.pdf
C.pdf
 
Program Logic and Design
Program Logic and DesignProgram Logic and Design
Program Logic and Design
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
1.Overview of Programming.pptx
1.Overview of Programming.pptx1.Overview of Programming.pptx
1.Overview of Programming.pptx
 
Compilers.pptx
Compilers.pptxCompilers.pptx
Compilers.pptx
 
Programming in C
Programming in CProgramming in C
Programming in C
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
 
PPL_Unit01 for the insem study first year.pptx
PPL_Unit01 for the insem study first year.pptxPPL_Unit01 for the insem study first year.pptx
PPL_Unit01 for the insem study first year.pptx
 

Recently uploaded

做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
MaleehaSheikh2
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
benishzehra469
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
ewymefz
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
NABLAS株式会社
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
pchutichetpong
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
AbhimanyuSinha9
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
mbawufebxi
 
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape ReportSOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
ewymefz
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
enxupq
 

Recently uploaded (20)

做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
 
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape ReportSOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape Report
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 

week 2 - INTRO TO PROGRAMMING.pptx

  • 3. Programming Language Evolution 1. Machine Language • Machine language is a collection of binary digits or bits that the computer reads and interprets. 2. Assembly Language • Uses symbolic operation code to represent the machine operation code. 3. High level Language • Uses English like statements
  • 4. Programming Language Evolution • High level language Example : C++ Add 2 numbers #include<iostream> Void main() { int a, b, c; cout <<“Enter two numbers:n”; cin >>a; cin >>b; c = a+b; cout <<“Sum of 2 numbers is {0}”, c); } • Machine Language Example: check if low-order 4 bits of value in reg 1 = 0 2000 load load zero into reg 0 220F load load string 00001111 into reg 2 8312 AND c(reg 1) AND c(reg 2) —> reg 3 — masking B3XY JMP jump to address XY if c(reg 3) = c(reg 0) • Assembly Language Example : Add 2 numbers name "add" mov al, 5 ; bin=00000101b mov bl, 10 ; hex=0ah or bin=00001010b add bl, al ; 5 + 10 = 15 (decimal) or hex=0fh or bin=00001111b
  • 5. Programming Language Paradigm • Programming paradigm is a fundamental style of computer programming • Programming paradigm is an approach to solving programming problems. • Programming paradigm that describes computation in terms of statements that change a program state. • It defines sequences of commands for the computer to perform • For example, • X := X+2 • Assignment changes the value at a location. • A program execution generates a sequence of states
  • 6. Programming Language Paradigm Common programming paradigms: 1.Imperative or Procedural Programming 2.Object-Oriented Programming 3.Functional Programming 4.Logic Programming
  • 8. Programming Language Paradigm 1. Imperative or Procedural Programming • a program is a series of statements containing variables. • Program execution involves changing the memory contents of the computer continuously. • Example of imperative languages are: C, FORTRAN, Pascal, COBOL etc • Advantages low memory utilization relatively efficient the most common form of programming in use today. • Disadvantages difficulty of reasoning about programs difficulty of parallelization. Tend to be relatively low level
  • 9. Programming Language Paradigm 2. Object-Oriented Programming • A program in this paradigm consists of objects which communicate with each other by sending messages • Example object oriented languages include: Java, C#, Smalltalk, etc • Advantages Conceptual simplicity Models computation better Increased productivity • Disadvantages Can have a steep learning curve, initially Doing I/O can be cumbersome
  • 10. Programming Language Paradigm 3. Functional Programming • A program in this paradigm consists of functions and uses functions in a similar way as used in mathematics • Program execution involves functions calling each other and returning results. There are no variables in functional languages • Example functional languages include: ML, MirandaTM, Haskell • Advantages  Small and clean syntax  Better support for reasoning about programs  They allow functions to be treated as any other data values.  They support programming at a relatively higher level than the imperative languages • Disadvantages  Difficulty of doing input-output  Functional languages use more storage space than their imperative cousins
  • 11. Programming Language Paradigm 4. Logic Programming • A program in the logic paradigm consists of a set of predicates and rules of inference. Predicates are statements of fact like the statement that says: water is wet. • Rules of inference are statements like: If X is human then X is mortal. The predicates and the rules of inference are used to prove statements that the programmer supplies. • Example: Prolog • Advantages Good support for reasoning about programs Can lead to concise solutions to problems • Disadvantages Slow execution Limited view of the world That means the system does not know about facts that are not its predicates and rules of inference. Difficulties in understanding and debugging large programs
  • 12. Translators • A translator is a computer program that performs the translation of a program written in a given programming language into a functionally equivalent program in a different ways computer language, without losing the functional or logical structure of the original code (the "essence" of each program) • Programs must be translated into machine codes before execution
  • 13. Translators Types of translator 1. Assembler 2. Compiler 3. interpreter
  • 14. Translators 1. Assembler • Assembler is a computer program which is used to translate program written in Assembly Language in to machine language. • A program which translates an assembly language program into a machine language program • Assembler are used to convert assembly language code into machine code.
  • 15. Translators 2. Compiler • A compiler is a program that translates a programme written in HLL to executable machine language • It is a program which translates a high level language program into a machine language program. • A compiler is more intelligent than an assembler. • Compilers are used to convert high level languages (like C, C++ ) into machine code
  • 16. Translators 3. Interpreter • Interpreter translates each instruction, executes it and then the next instruction is translated and this goes on until end of the program. • An interpreter is a program which translates statements of a program into machine code. • It translates only one statement of the program at a time. • An interpreter is a computer program which executes a statement directly (at runtime)