SlideShare a Scribd company logo
Language Translators
Syntax vs Semantics
Syntax: rules that govern how statements in a
computer programming language must be
constructed.
 Incorrect spelling
 Wrong brackets
 Leave off matching brackets
 Leave off end statements
Semantics: meaning conveyed by collection
of statements.
Computers (compilers) detect SYNTAX
errors, but they cannot determine the purpose
of programs or semantic meaning (yet!!).
Low Level Languages
Inside the RAM programs are represented in
binary form (000101000111100110, machine
code language)
First step: created codes that stand for binary
instructions (ADD 2310, Assembly Language:
each line corresponds to one machine code
instruction). They are machine specific.
As this was still difficult to handle High
Level Languages
High Level Languages
Portable: can run in different machines
English-like
One instruction = many machine code instructions
More than 2000 languages developed
Early: FORTRAN (FORmula TRANslation lang),
COBOL (COmmon Business Oriented Language,
ALGOL (ALGorithic Lang: first structured lang which
led to C and PASCAL), BASIC (Beginners All-
purpose Symbolic Code)
Object Oriented Languages: SAMLLTALK, C++ and
JAVA.
Compiler
Translation program that converts source code into
object code format (from HLL to machine code to be
executed)
Checks for syntax errors and reports to programmer.
Programmer corrects source code and compiles
again.
If syntactically correct  compiler links modules and
generates required object code.
Compiled code usually executes faster than an
interpreted version and can be moved to other
computers.
IDE
Integrated Development Environment
Integrates editor (to create the code) +
debugger (allows programmer to
remove bugs from source code)
Compiler
Interpreter
Translation Process
(Summary)
Converts source code into object code
that can be executed
Compiled code:
completely separate prg
Can stand alone
Does not need the compiler to run
Code run via an interpreter can be
usually viewed.
Compiler
Creates a completely
new prg to be executed.
Does not stop at the
first error and continues
reporting syntax errors
found.
No need to load into
memory to execute a
compiled prg
The object code cannot
be modified
Analyses and executes
each line of source code
in succession
Does not look first to the
entire prg
Runs slower than
compiled prg
Line being interpreted is
executed straight away
(good for large prg)
Need to be loaded each
time  memory usage
Interpreter
Compiling & Running Java
Compiles to an intermediate stage: Java
bytecode
Java bytecode:
 Stage found in in a java .class file produced by running
the javac program on a Java source code file.
 compressed version then passed to an interpreter
(JavaVirtual Machine)
JVM actually produces the machine code from the
bytecode file and pre-compiled library units
needed by the Op System.
Java Source file
.java extension
javac compiler
Java library files
(.class files) for
local platform
Java bytecode file
with .class
extension
Java interpreter (Java
Virtual Machine)
Java machine code
Ad

More Related Content

Similar to Computer Fundamentals and programming introduce (20)

Introduction to compiler development
Introduction to compiler developmentIntroduction to compiler development
Introduction to compiler development
DeepOad
 
La 5 Pl Translator
La 5   Pl TranslatorLa 5   Pl Translator
La 5 Pl Translator
Cma Mohd
 
COMPILER DESIGN.docx
COMPILER DESIGN.docxCOMPILER DESIGN.docx
COMPILER DESIGN.docx
Revathiparamanathan
 
Assembler
AssemblerAssembler
Assembler
Suneel Dogra
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and development
Ali Raza
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
Paras Patel
 
compilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdfcompilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdf
HarshaVardhan196987
 
basics of compiler design
basics of compiler designbasics of compiler design
basics of compiler design
Preeti Katiyar
 
2 Programming Language.pdf
2 Programming Language.pdf2 Programming Language.pdf
2 Programming Language.pdf
KINGZzofYouTube
 
Chapter1.pdf
Chapter1.pdfChapter1.pdf
Chapter1.pdf
tharwatabdulhmed
 
FIT-Unit3 chapter2- Computer Languages
FIT-Unit3 chapter2- Computer LanguagesFIT-Unit3 chapter2- Computer Languages
FIT-Unit3 chapter2- Computer Languages
raksharao
 
COMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONSCOMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONS
sonalikharade3
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
Noel Malle
 
Computer basics
Computer basicsComputer basics
Computer basics
sans87
 
Understanding-Computer-Languages-From-Machine-Code-to-High-Level-Abstractions...
Understanding-Computer-Languages-From-Machine-Code-to-High-Level-Abstractions...Understanding-Computer-Languages-From-Machine-Code-to-High-Level-Abstractions...
Understanding-Computer-Languages-From-Machine-Code-to-High-Level-Abstractions...
devilkiller2311
 
Compliers and interpreters
Compliers and interpretersCompliers and interpreters
Compliers and interpreters
shivasdhtsvmic
 
COMPUTER ORGANIZATION.pptxbkobuujghuujjj
COMPUTER ORGANIZATION.pptxbkobuujghuujjjCOMPUTER ORGANIZATION.pptxbkobuujghuujjj
COMPUTER ORGANIZATION.pptxbkobuujghuujjj
AnujyotiDe
 
Insight into progam execution ppt
Insight into progam execution pptInsight into progam execution ppt
Insight into progam execution ppt
Keerty Smile
 
Computer and programing basics.pptx
Computer and programing basics.pptxComputer and programing basics.pptx
Computer and programing basics.pptx
gaafergoda
 
C lecture notes new
C lecture notes newC lecture notes new
C lecture notes new
Kuntal Bhowmick
 
Introduction to compiler development
Introduction to compiler developmentIntroduction to compiler development
Introduction to compiler development
DeepOad
 
La 5 Pl Translator
La 5   Pl TranslatorLa 5   Pl Translator
La 5 Pl Translator
Cma Mohd
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and development
Ali Raza
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
Paras Patel
 
compilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdfcompilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdf
HarshaVardhan196987
 
basics of compiler design
basics of compiler designbasics of compiler design
basics of compiler design
Preeti Katiyar
 
2 Programming Language.pdf
2 Programming Language.pdf2 Programming Language.pdf
2 Programming Language.pdf
KINGZzofYouTube
 
FIT-Unit3 chapter2- Computer Languages
FIT-Unit3 chapter2- Computer LanguagesFIT-Unit3 chapter2- Computer Languages
FIT-Unit3 chapter2- Computer Languages
raksharao
 
COMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONSCOMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONS
sonalikharade3
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
Noel Malle
 
Computer basics
Computer basicsComputer basics
Computer basics
sans87
 
Understanding-Computer-Languages-From-Machine-Code-to-High-Level-Abstractions...
Understanding-Computer-Languages-From-Machine-Code-to-High-Level-Abstractions...Understanding-Computer-Languages-From-Machine-Code-to-High-Level-Abstractions...
Understanding-Computer-Languages-From-Machine-Code-to-High-Level-Abstractions...
devilkiller2311
 
Compliers and interpreters
Compliers and interpretersCompliers and interpreters
Compliers and interpreters
shivasdhtsvmic
 
COMPUTER ORGANIZATION.pptxbkobuujghuujjj
COMPUTER ORGANIZATION.pptxbkobuujghuujjjCOMPUTER ORGANIZATION.pptxbkobuujghuujjj
COMPUTER ORGANIZATION.pptxbkobuujghuujjj
AnujyotiDe
 
Insight into progam execution ppt
Insight into progam execution pptInsight into progam execution ppt
Insight into progam execution ppt
Keerty Smile
 
Computer and programing basics.pptx
Computer and programing basics.pptxComputer and programing basics.pptx
Computer and programing basics.pptx
gaafergoda
 

Recently uploaded (20)

Machine foundation notes for civil engineering students
Machine foundation notes for civil engineering studentsMachine foundation notes for civil engineering students
Machine foundation notes for civil engineering students
DYPCET
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdfATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ssuserda39791
 
acid base ppt and their specific application in food
acid base ppt and their specific application in foodacid base ppt and their specific application in food
acid base ppt and their specific application in food
Fatehatun Noor
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdfLittle Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
gori42199
 
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdfDavid Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry
 
Environment .................................
Environment .................................Environment .................................
Environment .................................
shadyozq9
 
OPTIMIZING DATA INTEROPERABILITY IN AGILE ORGANIZATIONS: INTEGRATING NONAKA’S...
OPTIMIZING DATA INTEROPERABILITY IN AGILE ORGANIZATIONS: INTEGRATING NONAKA’S...OPTIMIZING DATA INTEROPERABILITY IN AGILE ORGANIZATIONS: INTEGRATING NONAKA’S...
OPTIMIZING DATA INTEROPERABILITY IN AGILE ORGANIZATIONS: INTEGRATING NONAKA’S...
ijdmsjournal
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
Physical and Physic-Chemical Based Optimization Methods: A Review
Physical and Physic-Chemical Based Optimization Methods: A ReviewPhysical and Physic-Chemical Based Optimization Methods: A Review
Physical and Physic-Chemical Based Optimization Methods: A Review
Journal of Soft Computing in Civil Engineering
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
IBAAS 2023 Series_Lecture 8- Dr. Nandi.pdf
IBAAS 2023 Series_Lecture 8- Dr. Nandi.pdfIBAAS 2023 Series_Lecture 8- Dr. Nandi.pdf
IBAAS 2023 Series_Lecture 8- Dr. Nandi.pdf
VigneshPalaniappanM
 
Machine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATIONMachine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATION
DarrinBright1
 
Slide share PPT of NOx control technologies.pptx
Slide share PPT of  NOx control technologies.pptxSlide share PPT of  NOx control technologies.pptx
Slide share PPT of NOx control technologies.pptx
vvsasane
 
Generative AI & Large Language Models Agents
Generative AI & Large Language Models AgentsGenerative AI & Large Language Models Agents
Generative AI & Large Language Models Agents
aasgharbee22seecs
 
Deepfake Phishing: A New Frontier in Cyber Threats
Deepfake Phishing: A New Frontier in Cyber ThreatsDeepfake Phishing: A New Frontier in Cyber Threats
Deepfake Phishing: A New Frontier in Cyber Threats
RaviKumar256934
 
Machine foundation notes for civil engineering students
Machine foundation notes for civil engineering studentsMachine foundation notes for civil engineering students
Machine foundation notes for civil engineering students
DYPCET
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdfATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ssuserda39791
 
acid base ppt and their specific application in food
acid base ppt and their specific application in foodacid base ppt and their specific application in food
acid base ppt and their specific application in food
Fatehatun Noor
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdfLittle Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
gori42199
 
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdfDavid Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry
 
Environment .................................
Environment .................................Environment .................................
Environment .................................
shadyozq9
 
OPTIMIZING DATA INTEROPERABILITY IN AGILE ORGANIZATIONS: INTEGRATING NONAKA’S...
OPTIMIZING DATA INTEROPERABILITY IN AGILE ORGANIZATIONS: INTEGRATING NONAKA’S...OPTIMIZING DATA INTEROPERABILITY IN AGILE ORGANIZATIONS: INTEGRATING NONAKA’S...
OPTIMIZING DATA INTEROPERABILITY IN AGILE ORGANIZATIONS: INTEGRATING NONAKA’S...
ijdmsjournal
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
IBAAS 2023 Series_Lecture 8- Dr. Nandi.pdf
IBAAS 2023 Series_Lecture 8- Dr. Nandi.pdfIBAAS 2023 Series_Lecture 8- Dr. Nandi.pdf
IBAAS 2023 Series_Lecture 8- Dr. Nandi.pdf
VigneshPalaniappanM
 
Machine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATIONMachine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATION
DarrinBright1
 
Slide share PPT of NOx control technologies.pptx
Slide share PPT of  NOx control technologies.pptxSlide share PPT of  NOx control technologies.pptx
Slide share PPT of NOx control technologies.pptx
vvsasane
 
Generative AI & Large Language Models Agents
Generative AI & Large Language Models AgentsGenerative AI & Large Language Models Agents
Generative AI & Large Language Models Agents
aasgharbee22seecs
 
Deepfake Phishing: A New Frontier in Cyber Threats
Deepfake Phishing: A New Frontier in Cyber ThreatsDeepfake Phishing: A New Frontier in Cyber Threats
Deepfake Phishing: A New Frontier in Cyber Threats
RaviKumar256934
 
Ad

Computer Fundamentals and programming introduce

  • 2. Syntax vs Semantics Syntax: rules that govern how statements in a computer programming language must be constructed.  Incorrect spelling  Wrong brackets  Leave off matching brackets  Leave off end statements Semantics: meaning conveyed by collection of statements. Computers (compilers) detect SYNTAX errors, but they cannot determine the purpose of programs or semantic meaning (yet!!).
  • 3. Low Level Languages Inside the RAM programs are represented in binary form (000101000111100110, machine code language) First step: created codes that stand for binary instructions (ADD 2310, Assembly Language: each line corresponds to one machine code instruction). They are machine specific. As this was still difficult to handle High Level Languages
  • 4. High Level Languages Portable: can run in different machines English-like One instruction = many machine code instructions More than 2000 languages developed Early: FORTRAN (FORmula TRANslation lang), COBOL (COmmon Business Oriented Language, ALGOL (ALGorithic Lang: first structured lang which led to C and PASCAL), BASIC (Beginners All- purpose Symbolic Code) Object Oriented Languages: SAMLLTALK, C++ and JAVA.
  • 5. Compiler Translation program that converts source code into object code format (from HLL to machine code to be executed) Checks for syntax errors and reports to programmer. Programmer corrects source code and compiles again. If syntactically correct  compiler links modules and generates required object code. Compiled code usually executes faster than an interpreted version and can be moved to other computers.
  • 6. IDE Integrated Development Environment Integrates editor (to create the code) + debugger (allows programmer to remove bugs from source code)
  • 9. Translation Process (Summary) Converts source code into object code that can be executed Compiled code: completely separate prg Can stand alone Does not need the compiler to run Code run via an interpreter can be usually viewed.
  • 10. Compiler Creates a completely new prg to be executed. Does not stop at the first error and continues reporting syntax errors found. No need to load into memory to execute a compiled prg The object code cannot be modified Analyses and executes each line of source code in succession Does not look first to the entire prg Runs slower than compiled prg Line being interpreted is executed straight away (good for large prg) Need to be loaded each time  memory usage Interpreter
  • 11. Compiling & Running Java Compiles to an intermediate stage: Java bytecode Java bytecode:  Stage found in in a java .class file produced by running the javac program on a Java source code file.  compressed version then passed to an interpreter (JavaVirtual Machine) JVM actually produces the machine code from the bytecode file and pre-compiled library units needed by the Op System.
  • 12. Java Source file .java extension javac compiler Java library files (.class files) for local platform Java bytecode file with .class extension Java interpreter (Java Virtual Machine) Java machine code
  翻译: