SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Computer Science
(A Level)
Programming
Languages
Programmed code that has not yet been
compiled into an executable file
General name for any program that
translates code from one language to
another
(Definitions)
A program that translates a high–level
language into machine code by
translating all of the code
Compiled code that can be run as an
executable on any computer
(Definitions)
A program that translates a high–level language by
reading each statement in source code and
immediately performing the action
A program that translates a program written in
assembly language into machine code
(Definitions)
• The assembly code is known as source code and this is
translated into object code (compiled code) by an assembler.
• Before assembly code can be executed it must be translated
into the equivalent machine code. This is done by an
assembler.
• The assembler program takes each assembly code instruction
and converts it into the corresponding 0s and 1s.
• The input is called source code and the output is called object
code.
Assembler
• A compiler is a program that translates high-level
language (e.g. C++, Visual Basic etc.) into machine code.
• Source code is written by the programmer and input to
the compiler. It scans through several times , each time
performing different checks and building up tables of
information to produce the final object code.
• Different hardware platforms (Intel, Apple, etc.) require
different compilers.
• The object code (executable machine code) can be saved
and run without needing the compiler
Compiler
Compiler
Advantages Disadvantages
• Object code can be saved to disk and run
when required
• If an error have to recompile whole
program
• Executes faster • Will only run on a computer that has the
same platform
• Object code can be distributed or executed
without the compiler
• You cannot change the program without
going back to the source code
• Secure as object code cannot be read
without reverse engineering
• The translation is only done once and as a
separate process
• Compiled programs can run on any
computer
• An interpreter reads a statement of the source code
and immediately performs the required action.
• Once the programmer has written and saved a program
and instructs the computer to run it the interpreter looks
at each line in the source code analyses it and if there
no errors translates it into machine code.
Interpreter
Interpreter
Advantages Disadvantages
• Useful for program development as there is
no lengthy recompilation
• The program may run slower because
each statement has to be translated
every time it is encountered
• Easier to partially test and debug programs • Need to have the interpreter installed
(Interpreted programs can only run on
computers that have the interpreter)
• Can be run on different hardware platforms • Source code must be provided to users
• Easier to use
• You can interrupt it while it’s running,
change the program and either continue or
start again.
An instruction set used for
programming that can be executed
on any computer using a virtual
machine
(Definitions)
• Most interpreted languages (e.g. python or Java) use an
intermediate representation that combines compiling and
interpreting called bytecode
• This is an instruction set that can be executed using a virtual
machine (the bytecode interpreter) which emulates the
architecture of a computer.
• It is platform independent as long as the bytecode interpreter
is installed
• Bytecode can be either compiled once and for all (e.g. Java) or
each time the source code changes before execution (e.g.
python)
Bytecode

Weitere ähnliche Inhalte

Was ist angesagt?

Generation of computer languages
Generation of computer languagesGeneration of computer languages
Generation of computer languages
kitturashmikittu
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languages
Varun Garg
 

Was ist angesagt? (20)

Translators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreterTranslators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreter
 
Intro to assembly language
Intro to assembly languageIntro to assembly language
Intro to assembly language
 
Programming Fundamentals lecture 1
Programming Fundamentals lecture 1Programming Fundamentals lecture 1
Programming Fundamentals lecture 1
 
Computer Programming Overview
Computer Programming OverviewComputer Programming Overview
Computer Programming Overview
 
Passes of compilers
Passes of compilersPasses of compilers
Passes of compilers
 
Generations of programming_language.kum_ari11-1-1-1
Generations of programming_language.kum_ari11-1-1-1Generations of programming_language.kum_ari11-1-1-1
Generations of programming_language.kum_ari11-1-1-1
 
Generation of computer languages
Generation of computer languagesGeneration of computer languages
Generation of computer languages
 
Compiler Chapter 1
Compiler Chapter 1Compiler Chapter 1
Compiler Chapter 1
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languages
 
Theory of programming
Theory of programmingTheory of programming
Theory of programming
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and development
 
High level and Low level Language
High level and Low level Language High level and Low level Language
High level and Low level Language
 
Interpreter
InterpreterInterpreter
Interpreter
 
System Programming Overview
System Programming OverviewSystem Programming Overview
System Programming Overview
 
Introduction to Programming Languages
Introduction to Programming LanguagesIntroduction to Programming Languages
Introduction to Programming Languages
 
Programming languages and concepts by vivek parihar
Programming languages and concepts by vivek pariharProgramming languages and concepts by vivek parihar
Programming languages and concepts by vivek parihar
 
Program & language generation
Program & language generationProgram & language generation
Program & language generation
 
Programming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwaresProgramming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwares
 
Introduction to Software Engineering
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software Engineering
 

Andere mochten auch

Intermediate code- generation
Intermediate code- generationIntermediate code- generation
Intermediate code- generation
rawan_z
 

Andere mochten auch (18)

Nfa vs dfa
Nfa vs dfaNfa vs dfa
Nfa vs dfa
 
Minimization of DFA
Minimization of DFAMinimization of DFA
Minimization of DFA
 
Dfa vs nfa
Dfa vs nfaDfa vs nfa
Dfa vs nfa
 
Lexical Analysis
Lexical AnalysisLexical Analysis
Lexical Analysis
 
Optimization of dfa
Optimization of dfaOptimization of dfa
Optimization of dfa
 
optimization of DFA
optimization of DFAoptimization of DFA
optimization of DFA
 
NFA to DFA
NFA to DFANFA to DFA
NFA to DFA
 
DFA Minimization
DFA MinimizationDFA Minimization
DFA Minimization
 
Lexical analysis - Compiler Design
Lexical analysis - Compiler DesignLexical analysis - Compiler Design
Lexical analysis - Compiler Design
 
Bottom - Up Parsing
Bottom - Up ParsingBottom - Up Parsing
Bottom - Up Parsing
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
 
Phases of Compiler
Phases of CompilerPhases of Compiler
Phases of Compiler
 
Intermediate code- generation
Intermediate code- generationIntermediate code- generation
Intermediate code- generation
 
Lexical analyzer
Lexical analyzerLexical analyzer
Lexical analyzer
 
Language translator
Language translatorLanguage translator
Language translator
 
Intermediate code generation
Intermediate code generationIntermediate code generation
Intermediate code generation
 
Lexical analyzer
Lexical analyzerLexical analyzer
Lexical analyzer
 
Code generation
Code generationCode generation
Code generation
 

Ähnlich wie Programming Languages / Translators

Language processing system.pdf
Language processing system.pdfLanguage processing system.pdf
Language processing system.pdf
RakibRahman19
 
Programming Languages
Programming LanguagesProgramming Languages
Programming Languages
Mohamed Omar
 
Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi
Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi  Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi
Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi
Prof. (Dr.) Anand K. Tripathi
 

Ähnlich wie Programming Languages / Translators (20)

Compiler Design Introduction
Compiler Design Introduction Compiler Design Introduction
Compiler Design Introduction
 
Language processing system.pdf
Language processing system.pdfLanguage processing system.pdf
Language processing system.pdf
 
Week 08_Basics of Compiler Construction.pdf
Week 08_Basics of Compiler Construction.pdfWeek 08_Basics of Compiler Construction.pdf
Week 08_Basics of Compiler Construction.pdf
 
Life cycle of a computer program
Life cycle of a computer programLife cycle of a computer program
Life cycle of a computer program
 
compiler vs interpreter
compiler vs interpretercompiler vs interpreter
compiler vs interpreter
 
Programming Languages
Programming LanguagesProgramming Languages
Programming Languages
 
Introduction to programming language (basic)
Introduction to programming language (basic)Introduction to programming language (basic)
Introduction to programming language (basic)
 
COMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONSCOMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONS
 
Introduction to compiler interpreter
Introduction to compiler interpreterIntroduction to compiler interpreter
Introduction to compiler interpreter
 
Programming Languages
Programming LanguagesProgramming Languages
Programming Languages
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
 
Compiler an overview
Compiler  an overviewCompiler  an overview
Compiler an overview
 
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
 
Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi
Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi  Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi
Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi
 
Language Translator ( Compiler)
Language Translator ( Compiler)Language Translator ( Compiler)
Language Translator ( Compiler)
 
Introduction to Compilers
Introduction to CompilersIntroduction to Compilers
Introduction to Compilers
 
Chapter1.pdf
Chapter1.pdfChapter1.pdf
Chapter1.pdf
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptx
 
PCSG_Computer_Science_Unit_1_Lecture_2.pptx
PCSG_Computer_Science_Unit_1_Lecture_2.pptxPCSG_Computer_Science_Unit_1_Lecture_2.pptx
PCSG_Computer_Science_Unit_1_Lecture_2.pptx
 
Insight into progam execution ppt
Insight into progam execution pptInsight into progam execution ppt
Insight into progam execution ppt
 

Mehr von Project Student

Mehr von Project Student (20)

Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)
 
Appraisal (Self Assessment, Peer Assessment, 360 Degree Feedback)
Appraisal (Self Assessment, Peer Assessment, 360 Degree Feedback)Appraisal (Self Assessment, Peer Assessment, 360 Degree Feedback)
Appraisal (Self Assessment, Peer Assessment, 360 Degree Feedback)
 
High Level Languages (Imperative, Object Orientated, Declarative)
High Level Languages (Imperative, Object Orientated, Declarative)High Level Languages (Imperative, Object Orientated, Declarative)
High Level Languages (Imperative, Object Orientated, Declarative)
 
Motivation Theories (Maslow's Hierarchy of Needs, Taylor's Scientific Managem...
Motivation Theories (Maslow's Hierarchy of Needs, Taylor's Scientific Managem...Motivation Theories (Maslow's Hierarchy of Needs, Taylor's Scientific Managem...
Motivation Theories (Maslow's Hierarchy of Needs, Taylor's Scientific Managem...
 
Operating System (Scheduling, Input and Output Management, Memory Management,...
Operating System (Scheduling, Input and Output Management, Memory Management,...Operating System (Scheduling, Input and Output Management, Memory Management,...
Operating System (Scheduling, Input and Output Management, Memory Management,...
 
Human Resources (HRM, Soft and Hard HRM)
Human Resources (HRM, Soft and Hard HRM)Human Resources (HRM, Soft and Hard HRM)
Human Resources (HRM, Soft and Hard HRM)
 
Classification of Programming Languages
Classification of Programming LanguagesClassification of Programming Languages
Classification of Programming Languages
 
Product Life Cycle (Stages and Extension Strategies)
Product Life Cycle (Stages and Extension Strategies)Product Life Cycle (Stages and Extension Strategies)
Product Life Cycle (Stages and Extension Strategies)
 
Product (Product Portfolio, Branding, USP, Product Depth and Breadth, Product...
Product (Product Portfolio, Branding, USP, Product Depth and Breadth, Product...Product (Product Portfolio, Branding, USP, Product Depth and Breadth, Product...
Product (Product Portfolio, Branding, USP, Product Depth and Breadth, Product...
 
Training Methods (On-The-Job, Off-The-Job, Retraining and Apprenticeships)
Training Methods (On-The-Job, Off-The-Job, Retraining and Apprenticeships)Training Methods (On-The-Job, Off-The-Job, Retraining and Apprenticeships)
Training Methods (On-The-Job, Off-The-Job, Retraining and Apprenticeships)
 
Price (Market-Orientated and Cost-Based Pricing)
Price (Market-Orientated and Cost-Based Pricing)Price (Market-Orientated and Cost-Based Pricing)
Price (Market-Orientated and Cost-Based Pricing)
 
Changes in working practices
Changes in working practicesChanges in working practices
Changes in working practices
 
Hexadecimal (Calculations and Explanations)
Hexadecimal (Calculations and Explanations)Hexadecimal (Calculations and Explanations)
Hexadecimal (Calculations and Explanations)
 
Error Checking and Correction (Parity Bit, Majority Voting, Check Digit)
Error Checking and Correction (Parity Bit, Majority Voting, Check Digit)Error Checking and Correction (Parity Bit, Majority Voting, Check Digit)
Error Checking and Correction (Parity Bit, Majority Voting, Check Digit)
 
Ascii and Unicode (Character Codes)
Ascii and Unicode (Character Codes)Ascii and Unicode (Character Codes)
Ascii and Unicode (Character Codes)
 
Workforce Planning (Process, Labour Shortage, Excess Labour)
Workforce Planning (Process, Labour Shortage, Excess Labour)Workforce Planning (Process, Labour Shortage, Excess Labour)
Workforce Planning (Process, Labour Shortage, Excess Labour)
 
Harvard vs Von Neumann Architecture
Harvard vs Von Neumann ArchitectureHarvard vs Von Neumann Architecture
Harvard vs Von Neumann Architecture
 
Assembly and Machine Code
Assembly and Machine CodeAssembly and Machine Code
Assembly and Machine Code
 
Software (Application and System Software)
Software (Application and System Software)Software (Application and System Software)
Software (Application and System Software)
 
Hardware and Software
Hardware and SoftwareHardware and Software
Hardware and Software
 

Kürzlich hochgeladen

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Programming Languages / Translators

  • 2. Programmed code that has not yet been compiled into an executable file General name for any program that translates code from one language to another (Definitions)
  • 3. A program that translates a high–level language into machine code by translating all of the code Compiled code that can be run as an executable on any computer (Definitions)
  • 4. A program that translates a high–level language by reading each statement in source code and immediately performing the action A program that translates a program written in assembly language into machine code (Definitions)
  • 5. • The assembly code is known as source code and this is translated into object code (compiled code) by an assembler. • Before assembly code can be executed it must be translated into the equivalent machine code. This is done by an assembler. • The assembler program takes each assembly code instruction and converts it into the corresponding 0s and 1s. • The input is called source code and the output is called object code. Assembler
  • 6. • A compiler is a program that translates high-level language (e.g. C++, Visual Basic etc.) into machine code. • Source code is written by the programmer and input to the compiler. It scans through several times , each time performing different checks and building up tables of information to produce the final object code. • Different hardware platforms (Intel, Apple, etc.) require different compilers. • The object code (executable machine code) can be saved and run without needing the compiler Compiler
  • 7. Compiler Advantages Disadvantages • Object code can be saved to disk and run when required • If an error have to recompile whole program • Executes faster • Will only run on a computer that has the same platform • Object code can be distributed or executed without the compiler • You cannot change the program without going back to the source code • Secure as object code cannot be read without reverse engineering • The translation is only done once and as a separate process • Compiled programs can run on any computer
  • 8. • An interpreter reads a statement of the source code and immediately performs the required action. • Once the programmer has written and saved a program and instructs the computer to run it the interpreter looks at each line in the source code analyses it and if there no errors translates it into machine code. Interpreter
  • 9. Interpreter Advantages Disadvantages • Useful for program development as there is no lengthy recompilation • The program may run slower because each statement has to be translated every time it is encountered • Easier to partially test and debug programs • Need to have the interpreter installed (Interpreted programs can only run on computers that have the interpreter) • Can be run on different hardware platforms • Source code must be provided to users • Easier to use • You can interrupt it while it’s running, change the program and either continue or start again.
  • 10. An instruction set used for programming that can be executed on any computer using a virtual machine (Definitions)
  • 11. • Most interpreted languages (e.g. python or Java) use an intermediate representation that combines compiling and interpreting called bytecode • This is an instruction set that can be executed using a virtual machine (the bytecode interpreter) which emulates the architecture of a computer. • It is platform independent as long as the bytecode interpreter is installed • Bytecode can be either compiled once and for all (e.g. Java) or each time the source code changes before execution (e.g. python) Bytecode