SlideShare a Scribd company logo
1 of 7
WELCOME
Name: Taiyaba Hossain
ID: 201015092
Section: EB
Batch no: 201
Department of CSE
Green University of Bangladesh
Presentation Topic: Op-Code Encoding
Techniques
COURSE TITLE: Computer Architecture
COURSE CODE: CSE-211
DIFFERENT OP-CODE ENCODING TECHNIQUES
ARE:
 Block-code technique
 Expanding op-code technique
 Huffman Encoding
Block-Code Technique
 To each of the 2K instructions a unique binary bit pattern of
length K is assigned.
 A K-to-2K decoder can then be used to decode all the
instructions. For example,
3 to 8 Decoder
Instructio
n 1
Instructio
n 2
Instructio
n 3Instructio
n 4
Instructio
n 5Instructio
n 6Instructio
n 7Instructio
n 8
3 op-code bit
• CONSIDER AN 4+12 BIT INSTRUCTION WITH A 4-BIT OP-CODE AND THREE
4-BIT ADDRESSES.
• IT CAN AT MOST ENCODE 16 THREE-ADDRESS INSTRUCTIONS.
• IF THERE ARE ONLY 15 SUCH THREE-ADDRESS INSTRUCTIONS, THEN ONE OF THE
UNUSED OP-CODE CAN BE USED TO EXPAND TO TWO-ADDRESS, ONE-ADDRESS
OR ZERO ADDRESS INSTRUCTIONS.
• AGAIN, THIS EXPANDED OP-CODE CAN ENCODE AT MOST 16 TWO-ADDRESS INSTRUCTIONS. AND
IF THERE ARE LESS THAN 16 SUCH INSTRUCTIONS, WE CAN EXPAND THE OP-CODE FURTHER
Expanding op-code technique
Op-code Address 1 Address 2 Address 3
1111 Op-code Address 1 Address 2
1111 1111 Op-code Address 1
1111 1111 1111 Op-code
 FEWER BITS ARE USED FOR MOST FREQUENTLY USED INSTRUCTIONS AND MORE FOR THE LEAST
FREQUENTLY USED ONES.
Huffman Encoding
• Given the probability of occurrences of each instruction, it is possible to
encode all the instructions with minimal number of bits, and with the
following property:
1
1/
2
1/1
6
1/1
6
1/1
6
1/1
6
1/
8
1/
8
1/
4
1/
4
1/
4
1/
8
1/
8
1/
2
1/
4
0
1
11
1
1
11
0
0
0 0 0 0
HALT JUMP SHIFT NOT AND ADD STO LOAD
000
0
000
1
001
0
001
1
01
0
01
1
1
0
1
1
ADVANTAGE:
• MINIMAL NUMBER OF BITS
DISADVANTAGE:
• MUST DECODE INSTRUCTIONS BIT-BY-BIT, (CAN BE SLOW).
• TO DECODE, MUST HAVE A LOGICAL REPRESENTATION OF THE ENCODED TREE,
AND FOLLOW BRANCHES AS WE DECIPHER BITS
• FACT IS, MOST DECODING IS DONE IN PARALLEL
• GIVES A SPEED ADVANTAGE
Op-Code Encoding, Huffman Codes
Op-Code Encoding Techniques for Computer Architecture

More Related Content

What's hot

Variants of Turing Machine
Variants of Turing MachineVariants of Turing Machine
Variants of Turing MachineRajendran
 
Huffman Coding Algorithm Presentation
Huffman Coding Algorithm PresentationHuffman Coding Algorithm Presentation
Huffman Coding Algorithm PresentationAkm Monir
 
assembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YUassembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YUEducation
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examplesankitamakin
 
Lecture 04 syntax analysis
Lecture 04 syntax analysisLecture 04 syntax analysis
Lecture 04 syntax analysisIffat Anjum
 
Theory of Computation Grammar Concepts and Problems
Theory of Computation Grammar Concepts and ProblemsTheory of Computation Grammar Concepts and Problems
Theory of Computation Grammar Concepts and ProblemsRushabh2428
 
Regular expression with DFA
Regular expression with DFARegular expression with DFA
Regular expression with DFAMaulik Togadiya
 
Backus Naur and Chomsky Normal Forms
Backus Naur and Chomsky Normal FormsBackus Naur and Chomsky Normal Forms
Backus Naur and Chomsky Normal FormsAshutosh Pandey
 
Top Down Parsing, Predictive Parsing
Top Down Parsing, Predictive ParsingTop Down Parsing, Predictive Parsing
Top Down Parsing, Predictive ParsingTanzeela_Hussain
 
SHA 1 Algorithm.ppt
SHA 1 Algorithm.pptSHA 1 Algorithm.ppt
SHA 1 Algorithm.pptRajapriya82
 
Logical, Shift, and Rotate Instruction
Logical, Shift, and Rotate InstructionLogical, Shift, and Rotate Instruction
Logical, Shift, and Rotate InstructionBadrul Alam
 
Flow control instructions
Flow control instructionsFlow control instructions
Flow control instructionsProdip Ghosh
 
Compiler design and lexical analyser
Compiler design and lexical analyserCompiler design and lexical analyser
Compiler design and lexical analyserabhishek gupta
 
Data transfer and manipulation
Data transfer and manipulationData transfer and manipulation
Data transfer and manipulationrajshreemuthiah
 
Excess 3 to bcd converter
Excess 3 to bcd converterExcess 3 to bcd converter
Excess 3 to bcd converterGarla Prajwal
 
Error control coding using bose chaudhuri hocquenghem bch codes
Error control coding using bose chaudhuri hocquenghem bch codesError control coding using bose chaudhuri hocquenghem bch codes
Error control coding using bose chaudhuri hocquenghem bch codesIAEME Publication
 
Introduction to ibm pc assembly language
Introduction to ibm pc assembly languageIntroduction to ibm pc assembly language
Introduction to ibm pc assembly languagewarda aziz
 

What's hot (20)

Variants of Turing Machine
Variants of Turing MachineVariants of Turing Machine
Variants of Turing Machine
 
Huffman Coding Algorithm Presentation
Huffman Coding Algorithm PresentationHuffman Coding Algorithm Presentation
Huffman Coding Algorithm Presentation
 
assembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YUassembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YU
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
 
Lecture 04 syntax analysis
Lecture 04 syntax analysisLecture 04 syntax analysis
Lecture 04 syntax analysis
 
Theory of Computation Grammar Concepts and Problems
Theory of Computation Grammar Concepts and ProblemsTheory of Computation Grammar Concepts and Problems
Theory of Computation Grammar Concepts and Problems
 
Regular expression with DFA
Regular expression with DFARegular expression with DFA
Regular expression with DFA
 
Backus Naur and Chomsky Normal Forms
Backus Naur and Chomsky Normal FormsBackus Naur and Chomsky Normal Forms
Backus Naur and Chomsky Normal Forms
 
Bottom up parser
Bottom up parserBottom up parser
Bottom up parser
 
Top Down Parsing, Predictive Parsing
Top Down Parsing, Predictive ParsingTop Down Parsing, Predictive Parsing
Top Down Parsing, Predictive Parsing
 
SHA 1 Algorithm.ppt
SHA 1 Algorithm.pptSHA 1 Algorithm.ppt
SHA 1 Algorithm.ppt
 
Logical, Shift, and Rotate Instruction
Logical, Shift, and Rotate InstructionLogical, Shift, and Rotate Instruction
Logical, Shift, and Rotate Instruction
 
Minimization of DFA
Minimization of DFAMinimization of DFA
Minimization of DFA
 
Flow control instructions
Flow control instructionsFlow control instructions
Flow control instructions
 
Chapter11 addressing
Chapter11 addressingChapter11 addressing
Chapter11 addressing
 
Compiler design and lexical analyser
Compiler design and lexical analyserCompiler design and lexical analyser
Compiler design and lexical analyser
 
Data transfer and manipulation
Data transfer and manipulationData transfer and manipulation
Data transfer and manipulation
 
Excess 3 to bcd converter
Excess 3 to bcd converterExcess 3 to bcd converter
Excess 3 to bcd converter
 
Error control coding using bose chaudhuri hocquenghem bch codes
Error control coding using bose chaudhuri hocquenghem bch codesError control coding using bose chaudhuri hocquenghem bch codes
Error control coding using bose chaudhuri hocquenghem bch codes
 
Introduction to ibm pc assembly language
Introduction to ibm pc assembly languageIntroduction to ibm pc assembly language
Introduction to ibm pc assembly language
 

Similar to Op-Code Encoding Techniques for Computer Architecture

Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Prasenjit Dey
 
3.codes( binary code ,excess 3, gray code )
3.codes( binary code ,excess 3, gray code )3.codes( binary code ,excess 3, gray code )
3.codes( binary code ,excess 3, gray code )MdFazleRabbi18
 
COMPILER DESIGN AND CONSTRUCTION
COMPILER DESIGN AND CONSTRUCTIONCOMPILER DESIGN AND CONSTRUCTION
COMPILER DESIGN AND CONSTRUCTIONAnil Pokhrel
 
Digital electronics- BCD & Decoder
Digital electronics- BCD & DecoderDigital electronics- BCD & Decoder
Digital electronics- BCD & DecoderPritam Shil
 
Programming the basic computer
Programming the basic computerProgramming the basic computer
Programming the basic computerKamal Acharya
 
Student IP Addressing Tutorial.ppt
Student IP Addressing Tutorial.pptStudent IP Addressing Tutorial.ppt
Student IP Addressing Tutorial.pptjohnBronson6
 
ECET 330 Massive Success--snaptutorial.com
ECET 330 Massive Success--snaptutorial.comECET 330 Massive Success--snaptutorial.com
ECET 330 Massive Success--snaptutorial.comsantricksapiens71
 
Ecet 330 Success Begins / snaptutorial.com
Ecet 330 Success Begins / snaptutorial.comEcet 330 Success Begins / snaptutorial.com
Ecet 330 Success Begins / snaptutorial.comWilliamsTaylorzm
 
Ecet 330 Enthusiastic Study / snaptutorial.com
Ecet 330 Enthusiastic Study / snaptutorial.comEcet 330 Enthusiastic Study / snaptutorial.com
Ecet 330 Enthusiastic Study / snaptutorial.comStephenson033
 
ECET 330 Technology levels--snaptutorial.com
ECET 330 Technology levels--snaptutorial.comECET 330 Technology levels--snaptutorial.com
ECET 330 Technology levels--snaptutorial.comsholingarjosh102
 

Similar to Op-Code Encoding Techniques for Computer Architecture (20)

Turbo code
Turbo codeTurbo code
Turbo code
 
Op code encoding
Op code encodingOp code encoding
Op code encoding
 
MIC PROJECT.pdf
MIC PROJECT.pdfMIC PROJECT.pdf
MIC PROJECT.pdf
 
DEL LAB MANUAL
DEL LAB MANUALDEL LAB MANUAL
DEL LAB MANUAL
 
Computer-codes.pptx
Computer-codes.pptxComputer-codes.pptx
Computer-codes.pptx
 
CO_Chapter2.ppt
CO_Chapter2.pptCO_Chapter2.ppt
CO_Chapter2.ppt
 
Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Instruction set (prasenjit dey)
Instruction set (prasenjit dey)
 
3.codes( binary code ,excess 3, gray code )
3.codes( binary code ,excess 3, gray code )3.codes( binary code ,excess 3, gray code )
3.codes( binary code ,excess 3, gray code )
 
COMPILER DESIGN AND CONSTRUCTION
COMPILER DESIGN AND CONSTRUCTIONCOMPILER DESIGN AND CONSTRUCTION
COMPILER DESIGN AND CONSTRUCTION
 
Binary and EC codes
Binary and EC codesBinary and EC codes
Binary and EC codes
 
Digital electronics- BCD & Decoder
Digital electronics- BCD & DecoderDigital electronics- BCD & Decoder
Digital electronics- BCD & Decoder
 
Programming the basic computer
Programming the basic computerProgramming the basic computer
Programming the basic computer
 
Blockchain Technology - Week 9 - Blockciphers
Blockchain Technology - Week 9 - BlockciphersBlockchain Technology - Week 9 - Blockciphers
Blockchain Technology - Week 9 - Blockciphers
 
SaiKumarGurram_Resume
SaiKumarGurram_ResumeSaiKumarGurram_Resume
SaiKumarGurram_Resume
 
Student IP Addressing Tutorial.ppt
Student IP Addressing Tutorial.pptStudent IP Addressing Tutorial.ppt
Student IP Addressing Tutorial.ppt
 
DSD.pptx
DSD.pptxDSD.pptx
DSD.pptx
 
ECET 330 Massive Success--snaptutorial.com
ECET 330 Massive Success--snaptutorial.comECET 330 Massive Success--snaptutorial.com
ECET 330 Massive Success--snaptutorial.com
 
Ecet 330 Success Begins / snaptutorial.com
Ecet 330 Success Begins / snaptutorial.comEcet 330 Success Begins / snaptutorial.com
Ecet 330 Success Begins / snaptutorial.com
 
Ecet 330 Enthusiastic Study / snaptutorial.com
Ecet 330 Enthusiastic Study / snaptutorial.comEcet 330 Enthusiastic Study / snaptutorial.com
Ecet 330 Enthusiastic Study / snaptutorial.com
 
ECET 330 Technology levels--snaptutorial.com
ECET 330 Technology levels--snaptutorial.comECET 330 Technology levels--snaptutorial.com
ECET 330 Technology levels--snaptutorial.com
 

Recently uploaded

Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 

Recently uploaded (20)

Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 

Op-Code Encoding Techniques for Computer Architecture

  • 1. WELCOME Name: Taiyaba Hossain ID: 201015092 Section: EB Batch no: 201 Department of CSE Green University of Bangladesh Presentation Topic: Op-Code Encoding Techniques COURSE TITLE: Computer Architecture COURSE CODE: CSE-211
  • 2. DIFFERENT OP-CODE ENCODING TECHNIQUES ARE:  Block-code technique  Expanding op-code technique  Huffman Encoding
  • 3. Block-Code Technique  To each of the 2K instructions a unique binary bit pattern of length K is assigned.  A K-to-2K decoder can then be used to decode all the instructions. For example, 3 to 8 Decoder Instructio n 1 Instructio n 2 Instructio n 3Instructio n 4 Instructio n 5Instructio n 6Instructio n 7Instructio n 8 3 op-code bit
  • 4. • CONSIDER AN 4+12 BIT INSTRUCTION WITH A 4-BIT OP-CODE AND THREE 4-BIT ADDRESSES. • IT CAN AT MOST ENCODE 16 THREE-ADDRESS INSTRUCTIONS. • IF THERE ARE ONLY 15 SUCH THREE-ADDRESS INSTRUCTIONS, THEN ONE OF THE UNUSED OP-CODE CAN BE USED TO EXPAND TO TWO-ADDRESS, ONE-ADDRESS OR ZERO ADDRESS INSTRUCTIONS. • AGAIN, THIS EXPANDED OP-CODE CAN ENCODE AT MOST 16 TWO-ADDRESS INSTRUCTIONS. AND IF THERE ARE LESS THAN 16 SUCH INSTRUCTIONS, WE CAN EXPAND THE OP-CODE FURTHER Expanding op-code technique Op-code Address 1 Address 2 Address 3 1111 Op-code Address 1 Address 2 1111 1111 Op-code Address 1 1111 1111 1111 Op-code
  • 5.  FEWER BITS ARE USED FOR MOST FREQUENTLY USED INSTRUCTIONS AND MORE FOR THE LEAST FREQUENTLY USED ONES. Huffman Encoding • Given the probability of occurrences of each instruction, it is possible to encode all the instructions with minimal number of bits, and with the following property: 1 1/ 2 1/1 6 1/1 6 1/1 6 1/1 6 1/ 8 1/ 8 1/ 4 1/ 4 1/ 4 1/ 8 1/ 8 1/ 2 1/ 4 0 1 11 1 1 11 0 0 0 0 0 0 HALT JUMP SHIFT NOT AND ADD STO LOAD 000 0 000 1 001 0 001 1 01 0 01 1 1 0 1 1
  • 6. ADVANTAGE: • MINIMAL NUMBER OF BITS DISADVANTAGE: • MUST DECODE INSTRUCTIONS BIT-BY-BIT, (CAN BE SLOW). • TO DECODE, MUST HAVE A LOGICAL REPRESENTATION OF THE ENCODED TREE, AND FOLLOW BRANCHES AS WE DECIPHER BITS • FACT IS, MOST DECODING IS DONE IN PARALLEL • GIVES A SPEED ADVANTAGE Op-Code Encoding, Huffman Codes