SlideShare a Scribd company logo
1 of 16
MICROCOMPUTER
ARCHTECTURE
INSTRUCTION
FORMATS
PRESENTED BY
M.LAVANYA
M.sc[CS&IT]
NSCAS.
INTRODUCTION
• The instruction 8086 1 to 7 bytes depending on the addressing
mode.
• The immediate byte may be 8 or 16 bit.
• The displacement in an instruction can be 0 or 8 or 16 bits.
• The op code and addressing designations may be 1 to 2 bytes.
• The op code uses 2 byte the different bytes of the instructions
are
Byte op code Here w=0/1 for 1byte/0 byte operand
d=0/1 to show the designated register is
source or destination.
1. Op code byte.
2. Addressing Mode byte.
3. Optional Lower displacement , address or data.
4. Optional Higher displacement , address or data.
5. Optional Lower , Higher displacement.
op code D or S W
MOD REG R/M
In op code there is a special 1 bit indicator such as
W,D,S,V,Z
• W-bit The op code includes a W-bit which indicates
whether a byte (w=0) or a word (w=1) .
• D-bit For double-operand instructions , one of the operands
must be a register specified by a REG field . The source
operand (D=0) or the destination operand (D=1) .
• S-bit This is referred to as sign extension . The S-bit
appears with the W-bit in the immediate to register / memory
add , sub and compare instructions .
8-bit operations S:W=00
16-bit operations with a 16-bit immediate
operand S:W=01
16-bit operations with a sign-extended 8-bit
immediate operand S:W=11 .
• V-bit Used by shift and rotate instructions to
determine the number of shifts.
• Z-bit Used by the REP instruction.
There are two op code/addressing mode bytes , then the
second byte is of one of the following two forms:
or
MOD OP CODE R/M
MOD REG R/M
• The first of this forms is for single - operand
instructions.
• The second for double - operand instructions , in
which case REG specifies a register that is the source
operand or destination operand depending on the value
of the D-bit.
Register Addresses
Register
address. W=1 W=0
Register
address.
Segment
register.
000 AX AL 00 ES
001 CX CL 01 CS
010 DX DL 10 SS
011 BX BL 11 DS
100 SP AH
101 BP CH
110 SI DH
111 DI BH
Registers
Address Mode and default segment Registers for Various
MOD and R/M field combinations
• If MOD , an effective address is computed according to the
entire in the table.
• If MOD = 00 means that there is no displacement except when
R/M = 110.
• If MOD = 01 means that the third byte of the instruction
contains an 8 - bit displacement which is automatically sign -
extended to 16 – bits.
• If MOD = 10 means that the third and fourth bytes of the
instructions contain a 16 – displacement.
• If MOD = 11, the operand is in the register whose address is
designated by the R/M field.
Formats for the ADD instructions
An ADD causes the contents of the location indicated by the
source operand to be added to the contents of the location
indicated by the destination operand and the sum to replace the
contents of the location indicated by the destination operand .
Two equivalent instructions for adding the content of the BH
registers to those of the CL register.
• In the first instruction D = 1 indicates that REG = 001 = CL is
where the sum will be stored . MOD = 11, so that R/M
designates a register, the register 111 = BH.
• In the second instruction, D = 0, which causes REG = 111
=BH to be the source . Again MOD = 11 and R/M designates a
register, which in this case is 001 = CL.
Two example of the ADD instruction using the relative based
indexed addressing mode
From D = 0 it is seen that the sum is put in the memory
location and W = 1 indicates a 16 – bits addition . The effective
address is found by adding the content of BX and DI to the 16 –
bit displacement which is 2345. If (BX) = 0892 and (DI) = 59A3,
then
EA = 0892 + 59A3 + 2345 = 857A
It then this instruction S = 1 and W = 1, which indicates the 8 –
bit immediate operand is sign extended to FF97 before it is
added. An equivalent instruction could be constructed of 6 bytes
by letting S:W = 01 and by including a 16 – bit immediate
operand containing 97FF
microcomputer architecture-Instruction formats

More Related Content

What's hot

10 8086 instruction set
10 8086 instruction set10 8086 instruction set
10 8086 instruction set
Shivam Singhal
 

What's hot (20)

8086 instruction set
8086 instruction set8086 instruction set
8086 instruction set
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
 
assembly language programming organization of IBM PC chapter 9 part-1(MULTIPL...
assembly language programming organization of IBM PC chapter 9 part-1(MULTIPL...assembly language programming organization of IBM PC chapter 9 part-1(MULTIPL...
assembly language programming organization of IBM PC chapter 9 part-1(MULTIPL...
 
Register allocation and assignment
Register allocation and assignmentRegister allocation and assignment
Register allocation and assignment
 
Compiler unit 5
Compiler  unit 5Compiler  unit 5
Compiler unit 5
 
Types of Instruction Format
Types of Instruction FormatTypes of Instruction Format
Types of Instruction Format
 
8086 instruction set
8086 instruction set8086 instruction set
8086 instruction set
 
Multiplication & division instructions microprocessor 8086
Multiplication & division instructions microprocessor 8086Multiplication & division instructions microprocessor 8086
Multiplication & division instructions microprocessor 8086
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Instruction set (prasenjit dey)
Instruction set (prasenjit dey)
 
Principles of Combinational Logic-1
Principles of Combinational Logic-1Principles of Combinational Logic-1
Principles of Combinational Logic-1
 
Instruction Set Of 8086 DIU CSE
Instruction Set Of 8086 DIU CSEInstruction Set Of 8086 DIU CSE
Instruction Set Of 8086 DIU CSE
 
Displacement addressing
Displacement addressingDisplacement addressing
Displacement addressing
 
Assembly Language -I
Assembly Language -IAssembly Language -I
Assembly Language -I
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formats
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Unit 3 – assembly language programming
Unit 3 – assembly language programmingUnit 3 – assembly language programming
Unit 3 – assembly language programming
 
Arrays and addressing modes
Arrays and addressing modesArrays and addressing modes
Arrays and addressing modes
 
10 8086 instruction set
10 8086 instruction set10 8086 instruction set
10 8086 instruction set
 
Instruction set
Instruction setInstruction set
Instruction set
 

Similar to microcomputer architecture-Instruction formats

Instruction set summary
Instruction set summary Instruction set summary
Instruction set summary
janicetiong
 

Similar to microcomputer architecture-Instruction formats (20)

Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086
 
address5ng modes.pptx IS A GOOD MATERIAL
address5ng  modes.pptx IS A GOOD MATERIALaddress5ng  modes.pptx IS A GOOD MATERIAL
address5ng modes.pptx IS A GOOD MATERIAL
 
Chapter4.1 2-mikroprocessor
Chapter4.1 2-mikroprocessorChapter4.1 2-mikroprocessor
Chapter4.1 2-mikroprocessor
 
Ch4
Ch4Ch4
Ch4
 
Module 2 instruction set
Module 2 instruction set Module 2 instruction set
Module 2 instruction set
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
 
Addressing mode of 80286 microprocessor
Addressing mode of 80286 microprocessorAddressing mode of 80286 microprocessor
Addressing mode of 80286 microprocessor
 
Notes 8086 instruction format
Notes 8086 instruction formatNotes 8086 instruction format
Notes 8086 instruction format
 
Instruction set summary
Instruction set summary Instruction set summary
Instruction set summary
 
microcontroller_instruction_set for ENGINEERING STUDENTS
microcontroller_instruction_set for  ENGINEERING STUDENTSmicrocontroller_instruction_set for  ENGINEERING STUDENTS
microcontroller_instruction_set for ENGINEERING STUDENTS
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
 
Register transfer language
Register transfer languageRegister transfer language
Register transfer language
 
COA pptx.pptx
COA pptx.pptxCOA pptx.pptx
COA pptx.pptx
 
Microprocessor Basics CH-3
Microprocessor Basics CH-3Microprocessor Basics CH-3
Microprocessor Basics CH-3
 
INTEL 8085 DATA FORMAT AND INSTRUCTIONS
INTEL 8085 DATA FORMAT AND INSTRUCTIONSINTEL 8085 DATA FORMAT AND INSTRUCTIONS
INTEL 8085 DATA FORMAT AND INSTRUCTIONS
 
Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085
 
Microcontroller instruction set
Microcontroller instruction setMicrocontroller instruction set
Microcontroller instruction set
 
Lecture 06
Lecture 06Lecture 06
Lecture 06
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
8051 data type and directives
8051 data type and directives8051 data type and directives
8051 data type and directives
 

More from lavanya marichamy

More from lavanya marichamy (17)

Digital video
Digital videoDigital video
Digital video
 
Network design consideration
Network design considerationNetwork design consideration
Network design consideration
 
Java servlets and CGI
Java servlets and CGIJava servlets and CGI
Java servlets and CGI
 
Data structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithmData structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithm
 
Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression models
 
Software requirements specification
Software requirements specificationSoftware requirements specification
Software requirements specification
 
Data mining primitives
Data mining primitivesData mining primitives
Data mining primitives
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Query evaluation and optimization
Query evaluation and optimizationQuery evaluation and optimization
Query evaluation and optimization
 
Basic Computer Organisation And Design
Basic Computer Organisation And DesignBasic Computer Organisation And Design
Basic Computer Organisation And Design
 
Register Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory TransferRegister Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory Transfer
 
Arithmetic micro operations
Arithmetic micro operationsArithmetic micro operations
Arithmetic micro operations
 
Recovery with concurrent transaction
Recovery with concurrent transactionRecovery with concurrent transaction
Recovery with concurrent transaction
 
Pointer in c
Pointer in cPointer in c
Pointer in c
 
Dynamic memory allocation in c
Dynamic memory allocation in cDynamic memory allocation in c
Dynamic memory allocation in c
 
IEEE STANDARED 802.5 LAN
IEEE STANDARED 802.5 LANIEEE STANDARED 802.5 LAN
IEEE STANDARED 802.5 LAN
 
Broadband isdn and atm
Broadband  isdn and atmBroadband  isdn and atm
Broadband isdn and atm
 

Recently uploaded

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 

microcomputer architecture-Instruction formats

  • 2. INTRODUCTION • The instruction 8086 1 to 7 bytes depending on the addressing mode. • The immediate byte may be 8 or 16 bit. • The displacement in an instruction can be 0 or 8 or 16 bits. • The op code and addressing designations may be 1 to 2 bytes. • The op code uses 2 byte the different bytes of the instructions are
  • 3.
  • 4. Byte op code Here w=0/1 for 1byte/0 byte operand d=0/1 to show the designated register is source or destination. 1. Op code byte. 2. Addressing Mode byte. 3. Optional Lower displacement , address or data. 4. Optional Higher displacement , address or data. 5. Optional Lower , Higher displacement. op code D or S W MOD REG R/M
  • 5. In op code there is a special 1 bit indicator such as W,D,S,V,Z • W-bit The op code includes a W-bit which indicates whether a byte (w=0) or a word (w=1) . • D-bit For double-operand instructions , one of the operands must be a register specified by a REG field . The source operand (D=0) or the destination operand (D=1) . • S-bit This is referred to as sign extension . The S-bit appears with the W-bit in the immediate to register / memory add , sub and compare instructions .
  • 6. 8-bit operations S:W=00 16-bit operations with a 16-bit immediate operand S:W=01 16-bit operations with a sign-extended 8-bit immediate operand S:W=11 . • V-bit Used by shift and rotate instructions to determine the number of shifts. • Z-bit Used by the REP instruction.
  • 7. There are two op code/addressing mode bytes , then the second byte is of one of the following two forms: or MOD OP CODE R/M MOD REG R/M
  • 8. • The first of this forms is for single - operand instructions. • The second for double - operand instructions , in which case REG specifies a register that is the source operand or destination operand depending on the value of the D-bit.
  • 9. Register Addresses Register address. W=1 W=0 Register address. Segment register. 000 AX AL 00 ES 001 CX CL 01 CS 010 DX DL 10 SS 011 BX BL 11 DS 100 SP AH 101 BP CH 110 SI DH 111 DI BH Registers
  • 10. Address Mode and default segment Registers for Various MOD and R/M field combinations
  • 11. • If MOD , an effective address is computed according to the entire in the table. • If MOD = 00 means that there is no displacement except when R/M = 110. • If MOD = 01 means that the third byte of the instruction contains an 8 - bit displacement which is automatically sign - extended to 16 – bits. • If MOD = 10 means that the third and fourth bytes of the instructions contain a 16 – displacement. • If MOD = 11, the operand is in the register whose address is designated by the R/M field.
  • 12. Formats for the ADD instructions An ADD causes the contents of the location indicated by the source operand to be added to the contents of the location indicated by the destination operand and the sum to replace the contents of the location indicated by the destination operand .
  • 13. Two equivalent instructions for adding the content of the BH registers to those of the CL register. • In the first instruction D = 1 indicates that REG = 001 = CL is where the sum will be stored . MOD = 11, so that R/M designates a register, the register 111 = BH. • In the second instruction, D = 0, which causes REG = 111 =BH to be the source . Again MOD = 11 and R/M designates a register, which in this case is 001 = CL.
  • 14. Two example of the ADD instruction using the relative based indexed addressing mode From D = 0 it is seen that the sum is put in the memory location and W = 1 indicates a 16 – bits addition . The effective address is found by adding the content of BX and DI to the 16 – bit displacement which is 2345. If (BX) = 0892 and (DI) = 59A3, then EA = 0892 + 59A3 + 2345 = 857A
  • 15. It then this instruction S = 1 and W = 1, which indicates the 8 – bit immediate operand is sign extended to FF97 before it is added. An equivalent instruction could be constructed of 6 bytes by letting S:W = 01 and by including a 16 – bit immediate operand containing 97FF