SlideShare a Scribd company logo
+
Addressing modes and formats
Submitted
by
Haitham
+
Addressing Modes
 Immediate
 Direct
 Indirect
 Register
 Register indirect
 Displacement
 Stack
The address field or fields
in a typical instruction
format are relatively small.
We would like to be able to
reference a large range of
locations in main memory
or, for some systems,
virtual memory. To achieve
this objective, a variety of
addressing techniques has
been employed
+
Effective address
 Usefulness of addressing
modes
• virtually all computer architectures provide
more than one of these addressing modes.
• To reduce the period the implementation of
programs
the effective address (EA). In
a system without virtual
memory, the effective
address will be either
a main memory
address or a register.
In a virtual memory
system the effective
address is a virtual
address or a register.
+
Relationship
( CISC) and (RISC)
of
addressing modes
Complex Instruction Set Computer (CISC)
designs provide a large number of
addressing modes.
The main motivations are
(1) To support complex data structures
(2) To provide flexibility to access operands
Reduced Instruction Set Computer(RISC)
Typically, a RISC machine, unlike a CISC
machine, uses a simple and relatively
straightforward set of addressing modes.
+
Immediate Addressing
 Simplest form of addressing
 Operand = A
 Operand is part of instruction
 Operand = address field
 e.g. ADD 5
 Add 5 to contents of accumulator
 5 is operand
 No memory reference to fetch data
 Fast
 Limited range
+
Immediate Addressing Diagram
OperandOpcode
Instruction
+
Direct Addressing
 Simple form of addressing
 Address field contains address of operand
 Effective address (EA) = address field (A)
 e.g. ADD A
 Add contents of cell A to accumulator
 Look in memory at address A for operand
 Single memory reference to access data
 No additional calculations to work out effective address
 Limited address space
+
Direct Addressing Diagram
Address AOpcode
Instruction
Memory
Operand
+
Indirect Addressing
 Reference to the address of a word in memory which contains
a full-length address of the operand
 EA = (A)
 Parentheses are to be interpreted as meaning contents of
 Advantage:
 For a word length of N an address space of 2N is now available
 Disadvantage:
 Instruction execution requires two memory references to fetch the
operand
 One to get its address and a second to get its value
+
Indirect Addressing Diagram
Address AOpcode
Instruction
Memory
Operand
Pointer to operand
+
Register (Direct) Addressing
 Address field refers to a register rather than a main memory
address
 EA = R
 Limited number of registers
 Very small address field needed Shorter instructions
 Faster instruction fetch
 No memory access
 Very limited address space
 Multiple registers helps performance
+
Register Addressing Diagram
Register Address ROpcode
Instruction
Registers
Operand
+
Register Indirect Addressing
 Analogous to indirect addressing
 The only difference is whether the address field refers to a memory
location or a register
 EA = (R)
 Large address space (2n)
 One fewer memory access than indirect addressing
+
Register Address ROpcode
Instruction
Memory
OperandPointer to Operand
Registers
Register Indirect Addressing
Diagram
+
Displacement Addressing
 Combines the capabilities of direct addressing and register indirect
addressing
 EA = A + (R)
 Requires that the instruction have two address fields, at least one
of which is explicit
 The value contained in one address field (value = A) is used directly
 The other address field refers to a register whose contents are added to
A to produce the effective address
 Most common uses:
 Relative addressing
 Base-register addressing
 Indexing
+
Displacement Addressing Diagram
Register ROpcode
Instruction
Memory
OperandPointer to Operand
Registers
Address A
+
+
Relative Addressing
 The implicitly referenced register is the program counter (PC)
 The next instruction address is added to the address field to produce
the EA
 Typically the address field is treated as a twos complement number for
this operation
 Thus the effective address is a displacement relative to the address of
the instruction
 R = Program counter, PC
 EA = A + (PC) PC contains the main address
 EA = PC+ D-address
 Operand = D-address
 PC + D-address = Data
+
Base-Register Addressing
 A holds displacement
 R holds pointer to base address
 R may be explicit or implicit
 e.g. segment registers in 80x86
+
Indexed Addressing
 The address field references a main memory address and the referenced
register contains a positive displacement from that address
 The method of calculating the EA is the same as for base-register addressing
 Autoindexing
 Automatically increment or decrement the index register after each reference to it
 EA = A + (R)
 (R)  (R) + 1
 Postindexing
 Indexing is performed after the indirection
 EA = (A) + (R)
 Preindexing
 Indexing is performed before the indirection
 EA = (A + (R))
+
 A = base
 R = displacement
 EA = A + R
 Good for accessing arrays
 EA = A + R
 R++
Indexed Addressing
+
Stack Addressing
 A stack is a linear array of locations
 Sometimes referred to as a pushdown list or last-in-first-out queue
 A stack is a reserved block of locations
 Items are appended to the top of the stack so that the block is partially filled
 Associated with the stack is a pointer whose value is the address of the top of
the stack
 The stack pointer is maintained in a register
 Thus references to stack locations in memory are in fact register indirect addresses
 Is a form of implied addressing
 The machine instructions need not include a memory reference but implicitly
operate on the top of the stack
+ Autoincrement /Autodecrement Mode
 A special case of indirect register mode. The register whose
number is included in the instruction code, contains the address of
the operand. Autoincrement Mode = after operand addressing ,
the contents of the register is incremented.
 Decrement Mode = before operand addressing, the contents of
the register is decrement.
load reg baes
(Effective address = contents of base register)
+
Pentium Addressing Modes
 Virtual or effective address is offset into segment
 Starting address plus offset gives linear address
 12 addressing modes available
 Immediate
 Register operand
 Displacement
 Base
 Base with displacement
 Scaled index with displacement
 Base with index and displacement
 Base scaled index with displacement
 Relative
Pentium Addressing Mode Calculation
+
PowerPC Addressing Modes
 Load/store architecture
 Indirect
 Instruction includes 16 bit displacement to be added to base register (may be
GP register)
 Can replace base register content with new address
 Indirect indexed
 Instruction references base register and index register (both may be GP)
 EA is sum of contents
 Branch address
 Absolute
 Relative
 Indirect
 Arithmetic
 Operands in registers or part of instruction
+
PowerPC Memory Operand
Addressing Modes

More Related Content

What's hot (20)

PPT
Instruction format
Sanjeev Patel
 
PPTX
General register organization (computer organization)
rishi ram khanal
 
PPTX
Microprogrammed Control Unit
PreethiSureshkumar1
 
PPT
Addressing modes
Mahesh Kumar Attri
 
PPTX
ADDRESSING MODES
Sadaf Rasheed
 
PPTX
Operating system paging and segmentation
hamza haseeb
 
PDF
Instruction code
Dr. Abhineet Anand
 
PPTX
Instruction codes
pradeepa velmurugan
 
PPT
Memory management
Vishal Singh
 
PDF
Computer organisation -morris mano
vishnu murthy
 
PPT
Microprogram Control
Anuj Modi
 
PPS
Computer instructions
Anuj Modi
 
PPT
Memory Addressing
chauhankapil
 
PPTX
instruction cycle ppt
sheetal singh
 
PPTX
Floating point arithmetic operations (1)
cs19club
 
PPTX
Memory Reference Instructions
Rabin BK
 
PPTX
Addressing modes
karthiga selvaraju
 
PPS
Timing and-control-unit
Anuj Modi
 
PPTX
Micro program example
rajshreemuthiah
 
PPTX
instruction format and addressing modes
RamaPrabha24
 
Instruction format
Sanjeev Patel
 
General register organization (computer organization)
rishi ram khanal
 
Microprogrammed Control Unit
PreethiSureshkumar1
 
Addressing modes
Mahesh Kumar Attri
 
ADDRESSING MODES
Sadaf Rasheed
 
Operating system paging and segmentation
hamza haseeb
 
Instruction code
Dr. Abhineet Anand
 
Instruction codes
pradeepa velmurugan
 
Memory management
Vishal Singh
 
Computer organisation -morris mano
vishnu murthy
 
Microprogram Control
Anuj Modi
 
Computer instructions
Anuj Modi
 
Memory Addressing
chauhankapil
 
instruction cycle ppt
sheetal singh
 
Floating point arithmetic operations (1)
cs19club
 
Memory Reference Instructions
Rabin BK
 
Addressing modes
karthiga selvaraju
 
Timing and-control-unit
Anuj Modi
 
Micro program example
rajshreemuthiah
 
instruction format and addressing modes
RamaPrabha24
 

Similar to Computer architecture addressing modes and formats (20)

PPTX
Anshika 1111.pptx
AnSHiKa187943
 
PPTX
CH13-COA10e update Addressing mode of instruction.pptx
ArifatunNesa
 
PPT
Advanced computer architect lesson 3 and 4
Ismail Mukiibi
 
PPT
Ch 11
Rishi Trivedi
 
PPT
Computer Architecture and organization ppt.
mali yogesh kumar
 
PDF
Presentation of addressing mode presentation
kiranrawkey2912
 
PPT
Addressing
souravmoy
 
PPT
Digital principles and computer organisation -Addressing modes.ppt
JemimaA1
 
PPT
11 instruction sets addressing modes
dilip kumar
 
PPTX
Addressing modes
Asif Iqbal
 
PDF
Ch13- Inst Addressing Modes & Formats.pdf
saimawarsi
 
PDF
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
samirbharat77
 
PPTX
Chapter11 addressing
Christian James Mingoy
 
PPT
addressing modes in computer architecture
ShahidSultan24
 
PPTX
Instruction Formats in computer architecture.pptx
tgoswami1907
 
PPTX
Addressing
Muhammad Ishaq
 
PPT
11 instruction sets addressing modes
Wasif Naeem
 
PDF
Addressing modes in computer organization
bushraphd2022
 
PPT
Lec3 instructions branch carl hamcher
Venkata Krishnakanth P
 
PPTX
Addressing modes ppt
sanjay pachauri
 
Anshika 1111.pptx
AnSHiKa187943
 
CH13-COA10e update Addressing mode of instruction.pptx
ArifatunNesa
 
Advanced computer architect lesson 3 and 4
Ismail Mukiibi
 
Computer Architecture and organization ppt.
mali yogesh kumar
 
Presentation of addressing mode presentation
kiranrawkey2912
 
Addressing
souravmoy
 
Digital principles and computer organisation -Addressing modes.ppt
JemimaA1
 
11 instruction sets addressing modes
dilip kumar
 
Addressing modes
Asif Iqbal
 
Ch13- Inst Addressing Modes & Formats.pdf
saimawarsi
 
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
samirbharat77
 
Chapter11 addressing
Christian James Mingoy
 
addressing modes in computer architecture
ShahidSultan24
 
Instruction Formats in computer architecture.pptx
tgoswami1907
 
Addressing
Muhammad Ishaq
 
11 instruction sets addressing modes
Wasif Naeem
 
Addressing modes in computer organization
bushraphd2022
 
Lec3 instructions branch carl hamcher
Venkata Krishnakanth P
 
Addressing modes ppt
sanjay pachauri
 
Ad

More from Mazin Alwaaly (20)

PPTX
Pattern recognition voice biometrics
Mazin Alwaaly
 
PPTX
Pattern recognition palm print authentication system
Mazin Alwaaly
 
PPTX
Pattern recognition on line signature
Mazin Alwaaly
 
PPTX
Pattern recognition multi biometrics using face and ear
Mazin Alwaaly
 
PPTX
Pattern recognition IRIS recognition
Mazin Alwaaly
 
PPT
Pattern recognition hand vascular pattern recognition
Mazin Alwaaly
 
PPTX
Pattern recognition Hand Geometry
Mazin Alwaaly
 
PPTX
Pattern recognition forensic dental identification
Mazin Alwaaly
 
PPT
Pattern recognition fingerprints
Mazin Alwaaly
 
PPTX
Pattern recognition facial recognition
Mazin Alwaaly
 
PPTX
Pattern recognition ear as a biometric
Mazin Alwaaly
 
PPTX
Pattern recognition 3d face recognition
Mazin Alwaaly
 
PPTX
Multimedia multimedia over wireless and mobile networks
Mazin Alwaaly
 
PPT
Multimedia network services and protocols for multimedia communications
Mazin Alwaaly
 
PPTX
Multimedia content based retrieval in digital libraries
Mazin Alwaaly
 
PPTX
Multimedia lossy compression algorithms
Mazin Alwaaly
 
PPTX
Multimedia lossless compression algorithms
Mazin Alwaaly
 
PPTX
Multimedia basic video compression techniques
Mazin Alwaaly
 
PPT
Multimedia image compression standards
Mazin Alwaaly
 
PPTX
Multimedia fundamental concepts in video
Mazin Alwaaly
 
Pattern recognition voice biometrics
Mazin Alwaaly
 
Pattern recognition palm print authentication system
Mazin Alwaaly
 
Pattern recognition on line signature
Mazin Alwaaly
 
Pattern recognition multi biometrics using face and ear
Mazin Alwaaly
 
Pattern recognition IRIS recognition
Mazin Alwaaly
 
Pattern recognition hand vascular pattern recognition
Mazin Alwaaly
 
Pattern recognition Hand Geometry
Mazin Alwaaly
 
Pattern recognition forensic dental identification
Mazin Alwaaly
 
Pattern recognition fingerprints
Mazin Alwaaly
 
Pattern recognition facial recognition
Mazin Alwaaly
 
Pattern recognition ear as a biometric
Mazin Alwaaly
 
Pattern recognition 3d face recognition
Mazin Alwaaly
 
Multimedia multimedia over wireless and mobile networks
Mazin Alwaaly
 
Multimedia network services and protocols for multimedia communications
Mazin Alwaaly
 
Multimedia content based retrieval in digital libraries
Mazin Alwaaly
 
Multimedia lossy compression algorithms
Mazin Alwaaly
 
Multimedia lossless compression algorithms
Mazin Alwaaly
 
Multimedia basic video compression techniques
Mazin Alwaaly
 
Multimedia image compression standards
Mazin Alwaaly
 
Multimedia fundamental concepts in video
Mazin Alwaaly
 
Ad

Recently uploaded (20)

PDF
The ALMA-CRISTAL survey: Gas, dust, and stars in star-forming galaxies when t...
Sérgio Sacani
 
PPTX
CNS.pptx Central nervous system meninges ventricles of brain it's structure a...
Ashwini I Chuncha
 
PDF
Rapid protoplanet formation in the outer Solar System recorded in a dunite fr...
Sérgio Sacani
 
DOCX
Paper - Taboo Language (Makalah Presentasi)
Sahmiral Amri Rajagukguk
 
DOCX
Analytical methods in CleaningValidation.docx
Markus Janssen
 
PDF
Calcium in a supernova remnant as a fingerprint of a sub-Chandrasekhar-mass e...
Sérgio Sacani
 
PDF
A Classification of Metamorphic Rocks Canada12.pdf
ErturulKanmaz
 
PPTX
ION EXCHANGE CHROMATOGRAPHY NEW PPT (JA).pptx
adhagalejotshna
 
PDF
2025 Insilicogen Company English Brochure
Insilico Gen
 
PDF
Carbonate formation and fluctuating habitability on Mars
Sérgio Sacani
 
PPTX
Bacillus thuringiensis.crops & golden rice
priyadharshini87125
 
PDF
Service innovation with AI: Transformation of value proposition and market se...
Selcen Ozturkcan
 
PPTX
Renewable Energy Resources - Introduction
BhajneetSingh1
 
PPT
Supercapacitor materials For Material science
AnasBalghaith1
 
PPTX
Systamatic Acquired Resistence (SAR).pptx
giriprasanthmuthuraj
 
DOCX
Paper - Suprasegmental Features (Makalah Presentasi)
Sahmiral Amri Rajagukguk
 
PDF
Historical Knowledge Bases with Semantic MediaWiki
BernhardKrabina
 
PPTX
770043401-q1-Ppt-pe-and-Health-7-week-1-lesson-1.pptx
AizaRazonado
 
PDF
Rational points on curves -- BIMR 2025 --
mmasdeu
 
PDF
Preserving brand authenticity amid AI-driven misinformation: Sustaining consu...
Selcen Ozturkcan
 
The ALMA-CRISTAL survey: Gas, dust, and stars in star-forming galaxies when t...
Sérgio Sacani
 
CNS.pptx Central nervous system meninges ventricles of brain it's structure a...
Ashwini I Chuncha
 
Rapid protoplanet formation in the outer Solar System recorded in a dunite fr...
Sérgio Sacani
 
Paper - Taboo Language (Makalah Presentasi)
Sahmiral Amri Rajagukguk
 
Analytical methods in CleaningValidation.docx
Markus Janssen
 
Calcium in a supernova remnant as a fingerprint of a sub-Chandrasekhar-mass e...
Sérgio Sacani
 
A Classification of Metamorphic Rocks Canada12.pdf
ErturulKanmaz
 
ION EXCHANGE CHROMATOGRAPHY NEW PPT (JA).pptx
adhagalejotshna
 
2025 Insilicogen Company English Brochure
Insilico Gen
 
Carbonate formation and fluctuating habitability on Mars
Sérgio Sacani
 
Bacillus thuringiensis.crops & golden rice
priyadharshini87125
 
Service innovation with AI: Transformation of value proposition and market se...
Selcen Ozturkcan
 
Renewable Energy Resources - Introduction
BhajneetSingh1
 
Supercapacitor materials For Material science
AnasBalghaith1
 
Systamatic Acquired Resistence (SAR).pptx
giriprasanthmuthuraj
 
Paper - Suprasegmental Features (Makalah Presentasi)
Sahmiral Amri Rajagukguk
 
Historical Knowledge Bases with Semantic MediaWiki
BernhardKrabina
 
770043401-q1-Ppt-pe-and-Health-7-week-1-lesson-1.pptx
AizaRazonado
 
Rational points on curves -- BIMR 2025 --
mmasdeu
 
Preserving brand authenticity amid AI-driven misinformation: Sustaining consu...
Selcen Ozturkcan
 

Computer architecture addressing modes and formats

  • 1. + Addressing modes and formats Submitted by Haitham
  • 2. + Addressing Modes  Immediate  Direct  Indirect  Register  Register indirect  Displacement  Stack The address field or fields in a typical instruction format are relatively small. We would like to be able to reference a large range of locations in main memory or, for some systems, virtual memory. To achieve this objective, a variety of addressing techniques has been employed
  • 3. + Effective address  Usefulness of addressing modes • virtually all computer architectures provide more than one of these addressing modes. • To reduce the period the implementation of programs the effective address (EA). In a system without virtual memory, the effective address will be either a main memory address or a register. In a virtual memory system the effective address is a virtual address or a register.
  • 4. + Relationship ( CISC) and (RISC) of addressing modes Complex Instruction Set Computer (CISC) designs provide a large number of addressing modes. The main motivations are (1) To support complex data structures (2) To provide flexibility to access operands Reduced Instruction Set Computer(RISC) Typically, a RISC machine, unlike a CISC machine, uses a simple and relatively straightforward set of addressing modes.
  • 5. + Immediate Addressing  Simplest form of addressing  Operand = A  Operand is part of instruction  Operand = address field  e.g. ADD 5  Add 5 to contents of accumulator  5 is operand  No memory reference to fetch data  Fast  Limited range
  • 7. + Direct Addressing  Simple form of addressing  Address field contains address of operand  Effective address (EA) = address field (A)  e.g. ADD A  Add contents of cell A to accumulator  Look in memory at address A for operand  Single memory reference to access data  No additional calculations to work out effective address  Limited address space
  • 8. + Direct Addressing Diagram Address AOpcode Instruction Memory Operand
  • 9. + Indirect Addressing  Reference to the address of a word in memory which contains a full-length address of the operand  EA = (A)  Parentheses are to be interpreted as meaning contents of  Advantage:  For a word length of N an address space of 2N is now available  Disadvantage:  Instruction execution requires two memory references to fetch the operand  One to get its address and a second to get its value
  • 10. + Indirect Addressing Diagram Address AOpcode Instruction Memory Operand Pointer to operand
  • 11. + Register (Direct) Addressing  Address field refers to a register rather than a main memory address  EA = R  Limited number of registers  Very small address field needed Shorter instructions  Faster instruction fetch  No memory access  Very limited address space  Multiple registers helps performance
  • 12. + Register Addressing Diagram Register Address ROpcode Instruction Registers Operand
  • 13. + Register Indirect Addressing  Analogous to indirect addressing  The only difference is whether the address field refers to a memory location or a register  EA = (R)  Large address space (2n)  One fewer memory access than indirect addressing
  • 14. + Register Address ROpcode Instruction Memory OperandPointer to Operand Registers Register Indirect Addressing Diagram
  • 15. + Displacement Addressing  Combines the capabilities of direct addressing and register indirect addressing  EA = A + (R)  Requires that the instruction have two address fields, at least one of which is explicit  The value contained in one address field (value = A) is used directly  The other address field refers to a register whose contents are added to A to produce the effective address  Most common uses:  Relative addressing  Base-register addressing  Indexing
  • 16. + Displacement Addressing Diagram Register ROpcode Instruction Memory OperandPointer to Operand Registers Address A +
  • 17. + Relative Addressing  The implicitly referenced register is the program counter (PC)  The next instruction address is added to the address field to produce the EA  Typically the address field is treated as a twos complement number for this operation  Thus the effective address is a displacement relative to the address of the instruction  R = Program counter, PC  EA = A + (PC) PC contains the main address  EA = PC+ D-address  Operand = D-address  PC + D-address = Data
  • 18. + Base-Register Addressing  A holds displacement  R holds pointer to base address  R may be explicit or implicit  e.g. segment registers in 80x86
  • 19. + Indexed Addressing  The address field references a main memory address and the referenced register contains a positive displacement from that address  The method of calculating the EA is the same as for base-register addressing  Autoindexing  Automatically increment or decrement the index register after each reference to it  EA = A + (R)  (R)  (R) + 1  Postindexing  Indexing is performed after the indirection  EA = (A) + (R)  Preindexing  Indexing is performed before the indirection  EA = (A + (R))
  • 20. +  A = base  R = displacement  EA = A + R  Good for accessing arrays  EA = A + R  R++ Indexed Addressing
  • 21. + Stack Addressing  A stack is a linear array of locations  Sometimes referred to as a pushdown list or last-in-first-out queue  A stack is a reserved block of locations  Items are appended to the top of the stack so that the block is partially filled  Associated with the stack is a pointer whose value is the address of the top of the stack  The stack pointer is maintained in a register  Thus references to stack locations in memory are in fact register indirect addresses  Is a form of implied addressing  The machine instructions need not include a memory reference but implicitly operate on the top of the stack
  • 22. + Autoincrement /Autodecrement Mode  A special case of indirect register mode. The register whose number is included in the instruction code, contains the address of the operand. Autoincrement Mode = after operand addressing , the contents of the register is incremented.  Decrement Mode = before operand addressing, the contents of the register is decrement. load reg baes (Effective address = contents of base register)
  • 23. + Pentium Addressing Modes  Virtual or effective address is offset into segment  Starting address plus offset gives linear address  12 addressing modes available  Immediate  Register operand  Displacement  Base  Base with displacement  Scaled index with displacement  Base with index and displacement  Base scaled index with displacement  Relative
  • 24. Pentium Addressing Mode Calculation
  • 25. + PowerPC Addressing Modes  Load/store architecture  Indirect  Instruction includes 16 bit displacement to be added to base register (may be GP register)  Can replace base register content with new address  Indirect indexed  Instruction references base register and index register (both may be GP)  EA is sum of contents  Branch address  Absolute  Relative  Indirect  Arithmetic  Operands in registers or part of instruction