Implementation  TRANSLATION
Syllabus Different Methods include: Translation Incremental Compilation Interpretation Advantages and disadvantages of each method The translation process.
Why Study the CPU? What does the CPU do? Is the brains of the computer. Reads and executes program instructions. Performs calculations and makes decisions (Processing). Also responsible for the detection of syntax and run-time errors within programs.
Why Study the CPU? Components of the CPU ALU  – The arithmetic logic unit and all arithmetic computations take place , such as addition, multiplications and all comparison operations. Control Unit  – Looks after the fetch-execute cycle to make sure it working effectively.
Why Study the CPU? Components of the CPU Accumulator  – A special storage register associated with the ALU which is used to store the results of instructions during processing. Program Counter  – Is a register that holds the address of the next instruction. Register  – A special storage location used for temporary storage of data.
Hierarchy of Code Translation Source Code Assembly Code Machine Code Opcode Operand Operand Instruction Address Data
What is Machine Code? Is the language of a computer system and that of the CPU. Known a the binary system. Each computer instruction is a string of binary digits. E.G. 100100 100010101 100100111111
Fetch-Execute Cycle 1. Fetch (Where to Go?) Instructions are fetched from main memory. The location of the next instruction is stored within a program register called the  Program Counter .
Fetch-Execute Cycle 2. Decode (What to do?) Separation of the machine code into an opcode and two operands take place. The opcode is then loaded into the instruction register.
Fetch-Execute Cycle 3. Execute (Carry out instructions) The opcode is sent to and executed by the ALU.
Fetch-Execute Cycle 4. Store (Copy the result) Results during processing are stored in the accumulator. Once processing is complete results are then sent to main memory.
Processing Instructions Sum = Total + Number Source Code // Assume Sum is at address 101 // Assume Total is at address 134 // Assume Number is at address 135 0. LOAD A 134 LOAD B 135 DIV SAVE C 101 5. STOP Assembly Code Machine Code 10110 10001111  111010000110 10110 11101111  101010000110 10000 10101111  100010000110 11110 10000011  100111100110 10100 11101111  100000000000 00110 11001111  100010001110
Translation Why does it occur? Computers cannot understand machine code. Source Code Machine Code Translator
Translation Process 1. Interpreter Source code is translated line by line and immediately executed. If errors exist they will cause an immediate halt. German sentence is spoken. INTERPRETER GERMAN ENGLISH English sentence is spoken. Interpreter translates message from German to English.
Translation Process 2. Compilation Known as ‘Batch Processing’ as an entire executable file is created. All errors are recorded and sent at the end. If changes are required then recompilation will be required. TRANSLATOR ENGLISH The translator converts the German in a novel for English
Translation Process 3. Incremental Compilation The aim is to reduce the time spent recompiling. Incremental compilers aim to reduce the translation time by only recompiling those parts of code that have changed since the last compile took place. TRANSLATOR The translator converts the new changes into a new edition. 1 st  Edition Changes 2 nd  Edition
Translation Process in Detail
Lexical Analysis Requires the source code to be read one character at a time. Each character is scanned and redundant characters such as remarks, spaces and indentation are removed. Variables, constants, operators, strings of text and control structures are labelled with a token. Most translators have a token dictionary.
Lexical Analysis Given the Following Source Code: BEGIN Get Number IF Number > 10 THEN Print OK ELSE Print No ENDIF END What would be the tokens? STRING !! CONSTANT % PRINT () GET :: OPERATOR <> ENDIF [] ELSE {} THEN ? IF $ END # BEGIN @ VARIABLE & Type Token
Lexical Analysis ANSWER @ :: & $ & <>% ? () !! {} () !! [] #
Syntactical Analysis The tokens are then passed through the syntactic analyser to determine the logic of the code. The syntactic analysis involves an examination of whether the identified elements in the statements are legal according to the syntax of the language. This process is best understood by a  Parse Tree.
Syntactical Analysis Parse Tree Selection IF Condition Then Statement Variable Operator Constant Else Statement String String
Syntactical Analysis Parse Tree Selection IF Condition Then Statement Variable Operator Constant Else Statement String String Number & > <> 10 % Print OK () !! Print No ()!!
Production of Machine Code This undertaken when the processes of lexical and syntactical analysis have been completed an no errors found. This stage involves converting each token into their respective machine code instructions. All characters in strings are converted to binary code using their ASCII values. Tokens are collected left to tight from the parse tree in a method called transversing.
Production of Machine Code This undertaken when the processes of lexical and syntactical analysis have been completed an no errors found. This stage involves converting each token into their respective machine code instructions. All characters in strings are converted to binary code using their ASCII values. Tokens are collected left to tight from the parse tree in a method called transversing.
Translation Tools 1. LINKER Does what the name suggests it links the main line to all the other sub modules. 2. LOADER This is the component of the translator that loads the module from main memory. 3. OPTIMISER Used to reduce redundant code for quick execution

More Related Content

PPT
Sdd Syntax Descriptions
PPTX
Kalmanfilter
PPT
Flow graphs and Path testing,path predicates and achievable paths
PPTX
ISTQB foundation level - day 2
PPT
Software Engineering (Testing techniques)
PPTX
Compiler construction tools
PPTX
Digital speech processing lecture1
PPTX
COMPILER DESIGN
Sdd Syntax Descriptions
Kalmanfilter
Flow graphs and Path testing,path predicates and achievable paths
ISTQB foundation level - day 2
Software Engineering (Testing techniques)
Compiler construction tools
Digital speech processing lecture1
COMPILER DESIGN

What's hot (20)

DOC
COMPUTER GRAPHICS LAB MANUAL
PDF
Unit II OFDM.pdf
PPTX
Communication stack
PPTX
System testing
PPTX
Software quality assurance
PDF
Kalman filter - Applications in Image processing
PPT
Compiler optimization
PPT
Minimization of DFA
PPTX
Regular expression (compiler)
PPT
PDF
State chart diagram
PPTX
Dcom ppt(en.39) dpcm
PPT
Test Levels & Techniques
PPTX
4_5802928814682016556.pptx
PPT
12-Syntax Directed Definition – Evaluation Order-09-06-2023.ppt
PPT
Assembler
PPTX
Autosar software component
PDF
IBM API Connect - overview
PPTX
AUToSAR introduction
PPTX
Mealy and moore machine
COMPUTER GRAPHICS LAB MANUAL
Unit II OFDM.pdf
Communication stack
System testing
Software quality assurance
Kalman filter - Applications in Image processing
Compiler optimization
Minimization of DFA
Regular expression (compiler)
State chart diagram
Dcom ppt(en.39) dpcm
Test Levels & Techniques
4_5802928814682016556.pptx
12-Syntax Directed Definition – Evaluation Order-09-06-2023.ppt
Assembler
Autosar software component
IBM API Connect - overview
AUToSAR introduction
Mealy and moore machine
Ad

Viewers also liked (6)

PDF
Pic programming gettingstarted
PPT
Sdd Maintenance Of Software Solutions
PPTX
Logic gates
PPT
Programming Hardware Devices
PPT
Electronic Circuits
PPT
Interface Design
Pic programming gettingstarted
Sdd Maintenance Of Software Solutions
Logic gates
Programming Hardware Devices
Electronic Circuits
Interface Design
Ad

Similar to SDD Translation (20)

PDF
Lecture 01 introduction to compiler
DOC
Compilerdesignnew 091219090526-phpapp02
DOC
Compiler Design(NANTHU NOTES)
DOC
Compiler Design(Nanthu)
PPTX
Unit1.pptx of compiler design students subjects
PPT
Cpcs302 1
DOCX
Dineshmaterial1 091225091539-phpapp02
PPT
Introduction to compiler
PPTX
1-Phases of compiler-26-04-2023.pptx
PPTX
Introduction to Compilers
PPTX
Chapter 1.pptx
PPTX
Phases of Compiler.pptx
PDF
COMPILER DESIGN Engineering learinin.pdf
PDF
3_1_COMPILER_DESIGNGARGREREGREGREGREGREGRGRERE
PDF
design intoduction of_COMPILER_DESIGN.pdf
PDF
1588147798Begining_ABUAD1.pdf
PPTX
Pros and cons of c as a compiler language
PDF
unit1pdf__2021_12_14_12_37_34.pdf
PPTX
Compiler Design Introduction
PPT
Chapter One
Lecture 01 introduction to compiler
Compilerdesignnew 091219090526-phpapp02
Compiler Design(NANTHU NOTES)
Compiler Design(Nanthu)
Unit1.pptx of compiler design students subjects
Cpcs302 1
Dineshmaterial1 091225091539-phpapp02
Introduction to compiler
1-Phases of compiler-26-04-2023.pptx
Introduction to Compilers
Chapter 1.pptx
Phases of Compiler.pptx
COMPILER DESIGN Engineering learinin.pdf
3_1_COMPILER_DESIGNGARGREREGREGREGREGREGRGRERE
design intoduction of_COMPILER_DESIGN.pdf
1588147798Begining_ABUAD1.pdf
Pros and cons of c as a compiler language
unit1pdf__2021_12_14_12_37_34.pdf
Compiler Design Introduction
Chapter One

More from gavhays (14)

PPT
Data types
PPT
End user development
PPT
Representation Of Data
PPT
N301 Designing Circuits
PPT
Integer Representation
PPT
Binary Arithmetic
PPT
Understanding Flip Flops
PPT
Plp
PPT
Boolean Algebra
PPT
Sdd Documentation
PPT
Testing Software Solutions
PPT
Reporting On The Testing Process
PPT
S D D Program Development Tools
PPT
The Role Of The Cpu
Data types
End user development
Representation Of Data
N301 Designing Circuits
Integer Representation
Binary Arithmetic
Understanding Flip Flops
Plp
Boolean Algebra
Sdd Documentation
Testing Software Solutions
Reporting On The Testing Process
S D D Program Development Tools
The Role Of The Cpu

Recently uploaded (20)

PDF
Statistics on Ai - sourced from AIPRM.pdf
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PPTX
MuleSoft-Compete-Deck for midddleware integrations
PDF
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
PDF
Aug23rd - Mulesoft Community Workshop - Hyd, India.pdf
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PPTX
agenticai-neweraofintelligence-250529192801-1b5e6870.pptx
PDF
Planning-an-Audit-A-How-To-Guide-Checklist-WP.pdf
PPTX
Training Program for knowledge in solar cell and solar industry
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PPTX
Microsoft User Copilot Training Slide Deck
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PDF
SaaS reusability assessment using machine learning techniques
PDF
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
Statistics on Ai - sourced from AIPRM.pdf
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
giants, standing on the shoulders of - by Daniel Stenberg
Early detection and classification of bone marrow changes in lumbar vertebrae...
NewMind AI Weekly Chronicles – August ’25 Week IV
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
MuleSoft-Compete-Deck for midddleware integrations
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
Aug23rd - Mulesoft Community Workshop - Hyd, India.pdf
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
Basics of Cloud Computing - Cloud Ecosystem
agenticai-neweraofintelligence-250529192801-1b5e6870.pptx
Planning-an-Audit-A-How-To-Guide-Checklist-WP.pdf
Training Program for knowledge in solar cell and solar industry
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
Microsoft User Copilot Training Slide Deck
Custom Battery Pack Design Considerations for Performance and Safety
Enhancing plagiarism detection using data pre-processing and machine learning...
SaaS reusability assessment using machine learning techniques
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj

SDD Translation

  • 2. Syllabus Different Methods include: Translation Incremental Compilation Interpretation Advantages and disadvantages of each method The translation process.
  • 3. Why Study the CPU? What does the CPU do? Is the brains of the computer. Reads and executes program instructions. Performs calculations and makes decisions (Processing). Also responsible for the detection of syntax and run-time errors within programs.
  • 4. Why Study the CPU? Components of the CPU ALU – The arithmetic logic unit and all arithmetic computations take place , such as addition, multiplications and all comparison operations. Control Unit – Looks after the fetch-execute cycle to make sure it working effectively.
  • 5. Why Study the CPU? Components of the CPU Accumulator – A special storage register associated with the ALU which is used to store the results of instructions during processing. Program Counter – Is a register that holds the address of the next instruction. Register – A special storage location used for temporary storage of data.
  • 6. Hierarchy of Code Translation Source Code Assembly Code Machine Code Opcode Operand Operand Instruction Address Data
  • 7. What is Machine Code? Is the language of a computer system and that of the CPU. Known a the binary system. Each computer instruction is a string of binary digits. E.G. 100100 100010101 100100111111
  • 8. Fetch-Execute Cycle 1. Fetch (Where to Go?) Instructions are fetched from main memory. The location of the next instruction is stored within a program register called the Program Counter .
  • 9. Fetch-Execute Cycle 2. Decode (What to do?) Separation of the machine code into an opcode and two operands take place. The opcode is then loaded into the instruction register.
  • 10. Fetch-Execute Cycle 3. Execute (Carry out instructions) The opcode is sent to and executed by the ALU.
  • 11. Fetch-Execute Cycle 4. Store (Copy the result) Results during processing are stored in the accumulator. Once processing is complete results are then sent to main memory.
  • 12. Processing Instructions Sum = Total + Number Source Code // Assume Sum is at address 101 // Assume Total is at address 134 // Assume Number is at address 135 0. LOAD A 134 LOAD B 135 DIV SAVE C 101 5. STOP Assembly Code Machine Code 10110 10001111 111010000110 10110 11101111 101010000110 10000 10101111 100010000110 11110 10000011 100111100110 10100 11101111 100000000000 00110 11001111 100010001110
  • 13. Translation Why does it occur? Computers cannot understand machine code. Source Code Machine Code Translator
  • 14. Translation Process 1. Interpreter Source code is translated line by line and immediately executed. If errors exist they will cause an immediate halt. German sentence is spoken. INTERPRETER GERMAN ENGLISH English sentence is spoken. Interpreter translates message from German to English.
  • 15. Translation Process 2. Compilation Known as ‘Batch Processing’ as an entire executable file is created. All errors are recorded and sent at the end. If changes are required then recompilation will be required. TRANSLATOR ENGLISH The translator converts the German in a novel for English
  • 16. Translation Process 3. Incremental Compilation The aim is to reduce the time spent recompiling. Incremental compilers aim to reduce the translation time by only recompiling those parts of code that have changed since the last compile took place. TRANSLATOR The translator converts the new changes into a new edition. 1 st Edition Changes 2 nd Edition
  • 18. Lexical Analysis Requires the source code to be read one character at a time. Each character is scanned and redundant characters such as remarks, spaces and indentation are removed. Variables, constants, operators, strings of text and control structures are labelled with a token. Most translators have a token dictionary.
  • 19. Lexical Analysis Given the Following Source Code: BEGIN Get Number IF Number > 10 THEN Print OK ELSE Print No ENDIF END What would be the tokens? STRING !! CONSTANT % PRINT () GET :: OPERATOR <> ENDIF [] ELSE {} THEN ? IF $ END # BEGIN @ VARIABLE & Type Token
  • 20. Lexical Analysis ANSWER @ :: & $ & <>% ? () !! {} () !! [] #
  • 21. Syntactical Analysis The tokens are then passed through the syntactic analyser to determine the logic of the code. The syntactic analysis involves an examination of whether the identified elements in the statements are legal according to the syntax of the language. This process is best understood by a Parse Tree.
  • 22. Syntactical Analysis Parse Tree Selection IF Condition Then Statement Variable Operator Constant Else Statement String String
  • 23. Syntactical Analysis Parse Tree Selection IF Condition Then Statement Variable Operator Constant Else Statement String String Number & > <> 10 % Print OK () !! Print No ()!!
  • 24. Production of Machine Code This undertaken when the processes of lexical and syntactical analysis have been completed an no errors found. This stage involves converting each token into their respective machine code instructions. All characters in strings are converted to binary code using their ASCII values. Tokens are collected left to tight from the parse tree in a method called transversing.
  • 25. Production of Machine Code This undertaken when the processes of lexical and syntactical analysis have been completed an no errors found. This stage involves converting each token into their respective machine code instructions. All characters in strings are converted to binary code using their ASCII values. Tokens are collected left to tight from the parse tree in a method called transversing.
  • 26. Translation Tools 1. LINKER Does what the name suggests it links the main line to all the other sub modules. 2. LOADER This is the component of the translator that loads the module from main memory. 3. OPTIMISER Used to reduce redundant code for quick execution