SlideShare a Scribd company logo
1 of 11
Operation(Op) Code
Encoding Techniques
Index
Op-Code Encoding
Op-Code encoding techniques
Block-Code Technique
Expanding op-code technique
Huffman Encoding
Op-Code Encoding
Binary(0 , 1) pattern is known as op-code
encoding techniques.A processor can execute an
instruction only if it is convert as a binary
sequence. And this converted binary sequence is
Op-code encoding.
Op-Code Encoding Techniques
▪ Block-code technique
▪ Expanding op-code technique
▪ Huffman Encoding
fgf
Block-Code Technique
▪ If each instruction used the same number of bits than it
is known as block-code techniques
▪ It is a very simple and easy techniques.
3 to 8 Decoder
000 Instruction 1
001 Instruction 2
010 Instruction 3
011 Instruction 4
100 Instruction 5
101 Instruction 6
110 Instruction 7
111 Instruction 8
3 op-code bit
Expanding op-code technique
16 bit instruction and 4 bit address field
op-code address field address field
address field
it is 16,3 address field instruction
1 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0
1 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0
1 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0
1 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0
op-code
op-code address
field
address field
op-code op-code op-code address field
op-code op-code op-code op-code
256,2 address field instrution
4096,1 address field instrution
65536, 0 address field
instrution
Huffman Encoding
It is a memory saving encoding techniques,where we do
not need same number bits for each instruction.
Fewer bits are used for most frequently used instructions
and more bits for the least frequently used instructions.
23
28
38
62
100
34
1
5
10
13
14 14
7 7
2
5
0
0
0
1
1
0
0
0
0
1
1
1
1
1
Block/ expand encoding
for 5 ins 3*5 =15
for 34 ins. 3*34 = 102
total= 117
Huffman encoding
for 5 ins (10111) 5*5 =
25
for 34 ins (11) 2*34 =
68
total = 93
Op-Code Encoding, Huffman Codes
ADVANTAGE:
❏ Minimal number of bits
❏ Memory saving techniques
DISADVANTAGE:
❏ It is a slow technique because it decode instruction bit-by-
bit
❏ Fact is, most decoding is done in parallel
❏ to decode, must have a logical representation of the
encoded tree, and follow branches as we decipher bits
Op code encoding

More Related Content

Similar to Op code encoding

Intel µp instruction encoding and decoding
Intel µp instruction encoding and decodingIntel µp instruction encoding and decoding
Intel µp instruction encoding and decodingyocirem
 
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
 
timing_diagram_of_8085.pptx
timing_diagram_of_8085.pptxtiming_diagram_of_8085.pptx
timing_diagram_of_8085.pptxBhagyarajKosamia
 
Microprocessor instructions
Microprocessor instructionsMicroprocessor instructions
Microprocessor instructionshepzijustin
 
Op-Code Encoding
Op-Code Encoding Op-Code Encoding
Op-Code Encoding AL IMRAN
 
CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)guptakrishns23
 
Embedded system (Chapter 2) part 2
Embedded system (Chapter 2) part 2Embedded system (Chapter 2) part 2
Embedded system (Chapter 2) part 2Ikhwan_Fakrudin
 
Bus Structure, Memory and I/O Interfacing
Bus Structure, Memory and I/O InterfacingBus Structure, Memory and I/O Interfacing
Bus Structure, Memory and I/O InterfacingHetauda City College
 
Micro controller(pratheesh)
Micro controller(pratheesh)Micro controller(pratheesh)
Micro controller(pratheesh)Pratheesh Pala
 
Programming with 8085.pptx
Programming with 8085.pptxProgramming with 8085.pptx
Programming with 8085.pptxSachinKupade
 
Lecture 02 Data Group of Instructions
Lecture 02 Data Group of InstructionsLecture 02 Data Group of Instructions
Lecture 02 Data Group of InstructionsZeeshan Ahmed
 

Similar to Op code encoding (20)

Intel µp instruction encoding and decoding
Intel µp instruction encoding and decodingIntel µp instruction encoding and decoding
Intel µp instruction encoding and decoding
 
Coal (1)
Coal (1)Coal (1)
Coal (1)
 
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 )
 
timing_diagram_of_8085.pptx
timing_diagram_of_8085.pptxtiming_diagram_of_8085.pptx
timing_diagram_of_8085.pptx
 
8086 Microprocessor
8086 Microprocessor8086 Microprocessor
8086 Microprocessor
 
Microprocessor instructions
Microprocessor instructionsMicroprocessor instructions
Microprocessor instructions
 
UNIT-V.pptx
UNIT-V.pptxUNIT-V.pptx
UNIT-V.pptx
 
instruction format.pptx
instruction format.pptxinstruction format.pptx
instruction format.pptx
 
Op-Code Encoding
Op-Code Encoding Op-Code Encoding
Op-Code Encoding
 
CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)
 
Embedded system (Chapter 2) part 2
Embedded system (Chapter 2) part 2Embedded system (Chapter 2) part 2
Embedded system (Chapter 2) part 2
 
Unit6 Part3.ppt
Unit6 Part3.pptUnit6 Part3.ppt
Unit6 Part3.ppt
 
8051.ppt
8051.ppt8051.ppt
8051.ppt
 
Bus Structure, Memory and I/O Interfacing
Bus Structure, Memory and I/O InterfacingBus Structure, Memory and I/O Interfacing
Bus Structure, Memory and I/O Interfacing
 
module-3.pptx
module-3.pptxmodule-3.pptx
module-3.pptx
 
Micro controller(pratheesh)
Micro controller(pratheesh)Micro controller(pratheesh)
Micro controller(pratheesh)
 
Programming with 8085.pptx
Programming with 8085.pptxProgramming with 8085.pptx
Programming with 8085.pptx
 
ISA.pptx
ISA.pptxISA.pptx
ISA.pptx
 
Binary and EC codes
Binary and EC codesBinary and EC codes
Binary and EC codes
 
Lecture 02 Data Group of Instructions
Lecture 02 Data Group of InstructionsLecture 02 Data Group of Instructions
Lecture 02 Data Group of Instructions
 

Recently uploaded

Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadhamedmustafa094
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilVinayVitekari
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxchumtiyababu
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Call Girls Mumbai
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 

Recently uploaded (20)

Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 

Op code encoding

  • 2. Index Op-Code Encoding Op-Code encoding techniques Block-Code Technique Expanding op-code technique Huffman Encoding
  • 3. Op-Code Encoding Binary(0 , 1) pattern is known as op-code encoding techniques.A processor can execute an instruction only if it is convert as a binary sequence. And this converted binary sequence is Op-code encoding.
  • 4. Op-Code Encoding Techniques ▪ Block-code technique ▪ Expanding op-code technique ▪ Huffman Encoding
  • 5. fgf Block-Code Technique ▪ If each instruction used the same number of bits than it is known as block-code techniques ▪ It is a very simple and easy techniques. 3 to 8 Decoder 000 Instruction 1 001 Instruction 2 010 Instruction 3 011 Instruction 4 100 Instruction 5 101 Instruction 6 110 Instruction 7 111 Instruction 8 3 op-code bit
  • 6. Expanding op-code technique 16 bit instruction and 4 bit address field op-code address field address field address field it is 16,3 address field instruction 1 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0
  • 7. 1 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 1 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 1 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 op-code op-code address field address field op-code op-code op-code address field op-code op-code op-code op-code 256,2 address field instrution 4096,1 address field instrution 65536, 0 address field instrution
  • 8. Huffman Encoding It is a memory saving encoding techniques,where we do not need same number bits for each instruction. Fewer bits are used for most frequently used instructions and more bits for the least frequently used instructions.
  • 9. 23 28 38 62 100 34 1 5 10 13 14 14 7 7 2 5 0 0 0 1 1 0 0 0 0 1 1 1 1 1 Block/ expand encoding for 5 ins 3*5 =15 for 34 ins. 3*34 = 102 total= 117 Huffman encoding for 5 ins (10111) 5*5 = 25 for 34 ins (11) 2*34 = 68 total = 93
  • 10. Op-Code Encoding, Huffman Codes ADVANTAGE: ❏ Minimal number of bits ❏ Memory saving techniques DISADVANTAGE: ❏ It is a slow technique because it decode instruction bit-by- bit ❏ Fact is, most decoding is done in parallel ❏ to decode, must have a logical representation of the encoded tree, and follow branches as we decipher bits