SlideShare a Scribd company logo
1 of 26
Addressing modes
and formats
submitted by
Anshika Das
Addressing
Modes
The address field or fields
of 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.
• Immediate
• Direct
• Indirect
• Register
• Register indirect
• Displacement
• Stack
 Effective
address
theeffectiveaddress
(EA)inasystemwithout
virtualmemory,the
effectiveaddresswillbe
eitheramainmemory
addressoraregister.In
avirtualmemory
system,theeffective
addressisavirtual
addressoraregister.
Usefulness of addressing
modes
• Virtually all computer architectures provide more than
one of these addressing modes.
• To reduce the period the implementation of programs.
 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 structure
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 from of addressing
 Operand= A
 Operand is part of instruction
 Operand = address field
 e.g. ADD 5
 No memory reference to fetch the data
 Fast
 Limited range
 Add 5 to contents of accumulator
 5 is operand
Immediate Addressing Diagram
Opcode Operand
Instruction
Direct Addressing
 Simple form of addressing
 Address field contains address of operand
 Effective address(EA) = address field (A)
 E.g. ADD A
 Single memory reference to access data
 No additional calculations to work out effective address
 Limited address space
 Add contents of cell A to accumulator
 Look in memory at address A for operand
Direct Addressing Diagram
Opcode Address A
Operand
Instruction
Memory
Indirect Addressing
• Reference to the address of a word in memory which contains a full-length address of
the operand.
• EA= (A)
• Advantage:
• Disadvantage:
• One to get its address and a second to get its value
 Parentheses are to be interpreted as meaning contents of.
 For a word length of N an address space of 2^n is now available.
 Instruction execution requires two memory references to fetch the
operand
Indirect Addressing Diagram
Opcode Address A
Pointer to operand
Operand
Instruction
Memory
Register (Direct) Addressing
• Address field refers to a register rather than a main memory address
• EA=R
• Limited number of register
• Very small address field needed Shorter instructions
• Faster instruction fetch
• No memory access
• Very limited address space
• Multiple registers helps performance
Register Addressing Diagram
Opcode RegisterAddress R
Operand
Instruction
Register
Register Indirect Addressing
• Analogous to indirect addressing
• EA=(R)
• Large address space(2”)
• One fewer memory access than indirect addressing
 The only difference whether the address field refers to a memory location or a
register
Register Indirect Addressing Diagram
Opcode RegisterAddress R
Operand
Instruction
Memory
Pointer to operand
Registers
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
• Most common uses
 The value contained in one address field (value=A)is useddirectly
 The other address field refersto a register whose contents are added to A to produce the
effective address
 Relativeaddressing
 Base-registeraddressing
 Indexing
Displacement Addressing Diagram
Opcode RegisterAddress R
Operand
Instruction
Memory
Pointer to operand
Registers
Address A
Relative Addressing
• The implicitly referenced register is the program counter (PC)
• R= Program counter, PC
• EA=A+(PC) PC contains the main address
• 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
 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 register in 80X86
Index Addressing
• The address field references a main memory address and the reference register
contains a positive displacement from that address
• The method of calculation EA is the same as for base-register addressing
• Autoindexing
• Post indexing
• Pre indexing
 Automatically increment or decrement the index register after each reference to it
 EA=A+ (R)
 (R) (R) +1
 Indexing is performed after the indirection
 EA= (A)+(R)
 Indexing is performed before the indirection
 EA=(A+(R))
Index Addressing
 A= base
 R= displacement
 EA= A+R
 Good for accessing arrays
• EA= A+R
• R++
Stack Addressing
• A stack is a linear array of locations
• A stack is a reversed block of locations
• Associated with the stack is a pointer whose value is the address of the top of the stack
• Is a form of implied addressing
• The machine instructions need not include a memory reference but implicity operate on
the top of the stack
 Sometimes referred to as a pushdown list or last-in-first queue.
 Items are appended to the top of the top of the stack so that the block is partially filled
 The stack pointer is maintained in a register
 Thus references to stack locations in memory are in fact register indirect
addresses
Autoincrement/Autodecrement Mode
• A special case od 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 incement.
• 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
• 12 addressing modes available
 Starting address plus offset gives linear address.
 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
• Branch Address
• Arithmetic
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 reference base register and index register (both may be GP)
 ea is sum of contents,
 Absolute
 Relative
 Indirect
 Operands in register or part of instruction
PowerPC Memory Operand

More Related Content

Similar to Anshika 1111.pptx

Ch13- Inst Addressing Modes & Formats.pdf
Ch13- Inst Addressing Modes & Formats.pdfCh13- Inst Addressing Modes & Formats.pdf
Ch13- Inst Addressing Modes & Formats.pdfsaimawarsi
 
Computer Architecture and organization ppt.
Computer Architecture and organization ppt.Computer Architecture and organization ppt.
Computer Architecture and organization ppt.mali yogesh kumar
 
Computer Organisation - Addressing Modes
Computer Organisation - Addressing ModesComputer Organisation - Addressing Modes
Computer Organisation - Addressing ModesArunaDevi63
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes Wasif Naeem
 
11_ InstructionSetsAddressingModes .pdf
11_ InstructionSetsAddressingModes .pdf11_ InstructionSetsAddressingModes .pdf
11_ InstructionSetsAddressingModes .pdfWilliamTom9
 
Computer organization and architecture
Computer organization and architectureComputer organization and architecture
Computer organization and architectureSubesh Kumar Yadav
 
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086samirbharat77
 
Lec3 instructions branch carl hamcher
Lec3 instructions branch carl hamcher Lec3 instructions branch carl hamcher
Lec3 instructions branch carl hamcher Venkata Krishnakanth P
 
Presentation of addressing mode presentation
Presentation of addressing mode presentationPresentation of addressing mode presentation
Presentation of addressing mode presentationkiranrawkey2912
 
Advanced computer architect lesson 3 and 4
Advanced computer architect lesson 3 and 4Advanced computer architect lesson 3 and 4
Advanced computer architect lesson 3 and 4Ismail Mukiibi
 
(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)Alveena Saleem
 
Instruction Set (Part 2)
Instruction Set (Part 2)Instruction Set (Part 2)
Instruction Set (Part 2)Ajeng Savitri
 
LU3- 4 Instructions and Sequencing.pptx
LU3- 4 Instructions and Sequencing.pptxLU3- 4 Instructions and Sequencing.pptx
LU3- 4 Instructions and Sequencing.pptxAKumaraGuru
 
Compreport
CompreportCompreport
Compreportxdarlord
 

Similar to Anshika 1111.pptx (20)

Ch13- Inst Addressing Modes & Formats.pdf
Ch13- Inst Addressing Modes & Formats.pdfCh13- Inst Addressing Modes & Formats.pdf
Ch13- Inst Addressing Modes & Formats.pdf
 
Ch 11
Ch 11Ch 11
Ch 11
 
Computer Architecture and organization ppt.
Computer Architecture and organization ppt.Computer Architecture and organization ppt.
Computer Architecture and organization ppt.
 
Computer Organisation - Addressing Modes
Computer Organisation - Addressing ModesComputer Organisation - Addressing Modes
Computer Organisation - Addressing Modes
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes
 
11_ InstructionSetsAddressingModes .pdf
11_ InstructionSetsAddressingModes .pdf11_ InstructionSetsAddressingModes .pdf
11_ InstructionSetsAddressingModes .pdf
 
Computer organization and architecture
Computer organization and architectureComputer organization and architecture
Computer organization and architecture
 
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
 
Addressing
Addressing Addressing
Addressing
 
Lec3 instructions branch carl hamcher
Lec3 instructions branch carl hamcher Lec3 instructions branch carl hamcher
Lec3 instructions branch carl hamcher
 
Presentation of addressing mode presentation
Presentation of addressing mode presentationPresentation of addressing mode presentation
Presentation of addressing mode presentation
 
Advanced computer architect lesson 3 and 4
Advanced computer architect lesson 3 and 4Advanced computer architect lesson 3 and 4
Advanced computer architect lesson 3 and 4
 
(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)
 
Addressing modes ppt
Addressing modes pptAddressing modes ppt
Addressing modes ppt
 
CO_Chapter2.ppt
CO_Chapter2.pptCO_Chapter2.ppt
CO_Chapter2.ppt
 
Instruction Set (Part 2)
Instruction Set (Part 2)Instruction Set (Part 2)
Instruction Set (Part 2)
 
Memory Addressing
Memory AddressingMemory Addressing
Memory Addressing
 
LU3- 4 Instructions and Sequencing.pptx
LU3- 4 Instructions and Sequencing.pptxLU3- 4 Instructions and Sequencing.pptx
LU3- 4 Instructions and Sequencing.pptx
 
UNIT-3.pptx
UNIT-3.pptxUNIT-3.pptx
UNIT-3.pptx
 
Compreport
CompreportCompreport
Compreport
 

More from AnSHiKa187943

databasesecurit-phpapp01.pdf
databasesecurit-phpapp01.pdfdatabasesecurit-phpapp01.pdf
databasesecurit-phpapp01.pdfAnSHiKa187943
 
wepik-enhancing-visual-data-exploring-arithmetic-and-logic-operations-in-imag...
wepik-enhancing-visual-data-exploring-arithmetic-and-logic-operations-in-imag...wepik-enhancing-visual-data-exploring-arithmetic-and-logic-operations-in-imag...
wepik-enhancing-visual-data-exploring-arithmetic-and-logic-operations-in-imag...AnSHiKa187943
 
11100121024_Asif Ikbal_CA1_OS...pdf
11100121024_Asif Ikbal_CA1_OS...pdf11100121024_Asif Ikbal_CA1_OS...pdf
11100121024_Asif Ikbal_CA1_OS...pdfAnSHiKa187943
 
CA-1_14400121029_HSMC_301.pdf
CA-1_14400121029_HSMC_301.pdfCA-1_14400121029_HSMC_301.pdf
CA-1_14400121029_HSMC_301.pdfAnSHiKa187943
 
14400121029_Anshika Das_Software Engineering.pdf
14400121029_Anshika Das_Software Engineering.pdf14400121029_Anshika Das_Software Engineering.pdf
14400121029_Anshika Das_Software Engineering.pdfAnSHiKa187943
 
time-value-of-money.pptx
time-value-of-money.pptxtime-value-of-money.pptx
time-value-of-money.pptxAnSHiKa187943
 
divisionoflabour-170216153446-2.pptx
divisionoflabour-170216153446-2.pptxdivisionoflabour-170216153446-2.pptx
divisionoflabour-170216153446-2.pptxAnSHiKa187943
 
pumping-lemma-181011153118.pptx
pumping-lemma-181011153118.pptxpumping-lemma-181011153118.pptx
pumping-lemma-181011153118.pptxAnSHiKa187943
 
_86c448dfa47cdab170075f16cd25c650_PeerReviewforUpload.pptx
_86c448dfa47cdab170075f16cd25c650_PeerReviewforUpload.pptx_86c448dfa47cdab170075f16cd25c650_PeerReviewforUpload.pptx
_86c448dfa47cdab170075f16cd25c650_PeerReviewforUpload.pptxAnSHiKa187943
 
sorting-160810203705.pptx
sorting-160810203705.pptxsorting-160810203705.pptx
sorting-160810203705.pptxAnSHiKa187943
 
26-170918023441 (1).pptx
26-170918023441 (1).pptx26-170918023441 (1).pptx
26-170918023441 (1).pptxAnSHiKa187943
 
9pL7F2E8XI0alXYT280.pptx
9pL7F2E8XI0alXYT280.pptx9pL7F2E8XI0alXYT280.pptx
9pL7F2E8XI0alXYT280.pptxAnSHiKa187943
 

More from AnSHiKa187943 (17)

databasesecurit-phpapp01.pdf
databasesecurit-phpapp01.pdfdatabasesecurit-phpapp01.pdf
databasesecurit-phpapp01.pdf
 
wepik-enhancing-visual-data-exploring-arithmetic-and-logic-operations-in-imag...
wepik-enhancing-visual-data-exploring-arithmetic-and-logic-operations-in-imag...wepik-enhancing-visual-data-exploring-arithmetic-and-logic-operations-in-imag...
wepik-enhancing-visual-data-exploring-arithmetic-and-logic-operations-in-imag...
 
dd presentation.pdf
dd presentation.pdfdd presentation.pdf
dd presentation.pdf
 
11100121024_Asif Ikbal_CA1_OS...pdf
11100121024_Asif Ikbal_CA1_OS...pdf11100121024_Asif Ikbal_CA1_OS...pdf
11100121024_Asif Ikbal_CA1_OS...pdf
 
CA-1_14400121029_HSMC_301.pdf
CA-1_14400121029_HSMC_301.pdfCA-1_14400121029_HSMC_301.pdf
CA-1_14400121029_HSMC_301.pdf
 
14400121029_Anshika Das_Software Engineering.pdf
14400121029_Anshika Das_Software Engineering.pdf14400121029_Anshika Das_Software Engineering.pdf
14400121029_Anshika Das_Software Engineering.pdf
 
time-value-of-money.pptx
time-value-of-money.pptxtime-value-of-money.pptx
time-value-of-money.pptx
 
divisionoflabour-170216153446-2.pptx
divisionoflabour-170216153446-2.pptxdivisionoflabour-170216153446-2.pptx
divisionoflabour-170216153446-2.pptx
 
pumping-lemma-181011153118.pptx
pumping-lemma-181011153118.pptxpumping-lemma-181011153118.pptx
pumping-lemma-181011153118.pptx
 
LECT9.ppt
LECT9.pptLECT9.ppt
LECT9.ppt
 
_86c448dfa47cdab170075f16cd25c650_PeerReviewforUpload.pptx
_86c448dfa47cdab170075f16cd25c650_PeerReviewforUpload.pptx_86c448dfa47cdab170075f16cd25c650_PeerReviewforUpload.pptx
_86c448dfa47cdab170075f16cd25c650_PeerReviewforUpload.pptx
 
sorting-160810203705.pptx
sorting-160810203705.pptxsorting-160810203705.pptx
sorting-160810203705.pptx
 
ChodonKumar.pptx
ChodonKumar.pptxChodonKumar.pptx
ChodonKumar.pptx
 
SubhamDas.pptx
SubhamDas.pptxSubhamDas.pptx
SubhamDas.pptx
 
26-170918023441 (1).pptx
26-170918023441 (1).pptx26-170918023441 (1).pptx
26-170918023441 (1).pptx
 
BhamD.pptx
BhamD.pptxBhamD.pptx
BhamD.pptx
 
9pL7F2E8XI0alXYT280.pptx
9pL7F2E8XI0alXYT280.pptx9pL7F2E8XI0alXYT280.pptx
9pL7F2E8XI0alXYT280.pptx
 

Recently uploaded

Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
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
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"mphochane1998
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...josephjonse
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)ChandrakantDivate1
 
Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelDrAjayKumarYadav4
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesRashidFaridChishti
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwaitjaanualu31
 
Electromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxElectromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxNANDHAKUMARA10
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesChandrakantDivate1
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxpritamlangde
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessorAshwiniTodkar4
 
Introduction to Geographic Information Systems
Introduction to Geographic Information SystemsIntroduction to Geographic Information Systems
Introduction to Geographic Information SystemsAnge Felix NSANZIYERA
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementDr. Deepak Mudgal
 
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
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxMustafa Ahmed
 

Recently uploaded (20)

Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
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
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)
 
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
 
Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata Model
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Electromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxElectromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptx
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor
 
Introduction to Geographic Information Systems
Introduction to Geographic Information SystemsIntroduction to Geographic Information Systems
Introduction to Geographic Information Systems
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth Reinforcement
 
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...
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 

Anshika 1111.pptx

  • 2. Addressing Modes The address field or fields of 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. • Immediate • Direct • Indirect • Register • Register indirect • Displacement • Stack
  • 3.  Effective address theeffectiveaddress (EA)inasystemwithout virtualmemory,the effectiveaddresswillbe eitheramainmemory addressoraregister.In avirtualmemory system,theeffective addressisavirtual addressoraregister. Usefulness of addressing modes • Virtually all computer architectures provide more than one of these addressing modes. • To reduce the period the implementation of programs.
  • 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 structure 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 from of addressing  Operand= A  Operand is part of instruction  Operand = address field  e.g. ADD 5  No memory reference to fetch the data  Fast  Limited range  Add 5 to contents of accumulator  5 is operand
  • 7. Direct Addressing  Simple form of addressing  Address field contains address of operand  Effective address(EA) = address field (A)  E.g. ADD A  Single memory reference to access data  No additional calculations to work out effective address  Limited address space  Add contents of cell A to accumulator  Look in memory at address A for operand
  • 8. Direct Addressing Diagram Opcode Address A Operand Instruction Memory
  • 9. Indirect Addressing • Reference to the address of a word in memory which contains a full-length address of the operand. • EA= (A) • Advantage: • Disadvantage: • One to get its address and a second to get its value  Parentheses are to be interpreted as meaning contents of.  For a word length of N an address space of 2^n is now available.  Instruction execution requires two memory references to fetch the operand
  • 10. Indirect Addressing Diagram Opcode Address A Pointer to operand Operand Instruction Memory
  • 11. Register (Direct) Addressing • Address field refers to a register rather than a main memory address • EA=R • Limited number of register • 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 Opcode RegisterAddress R Operand Instruction Register
  • 13. Register Indirect Addressing • Analogous to indirect addressing • EA=(R) • Large address space(2”) • One fewer memory access than indirect addressing  The only difference whether the address field refers to a memory location or a register
  • 14. Register Indirect Addressing Diagram Opcode RegisterAddress R Operand Instruction Memory Pointer to operand Registers
  • 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 • Most common uses  The value contained in one address field (value=A)is useddirectly  The other address field refersto a register whose contents are added to A to produce the effective address  Relativeaddressing  Base-registeraddressing  Indexing
  • 16. Displacement Addressing Diagram Opcode RegisterAddress R Operand Instruction Memory Pointer to operand Registers Address A
  • 17. Relative Addressing • The implicitly referenced register is the program counter (PC) • R= Program counter, PC • EA=A+(PC) PC contains the main address • 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  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 register in 80X86
  • 19. Index Addressing • The address field references a main memory address and the reference register contains a positive displacement from that address • The method of calculation EA is the same as for base-register addressing • Autoindexing • Post indexing • Pre indexing  Automatically increment or decrement the index register after each reference to it  EA=A+ (R)  (R) (R) +1  Indexing is performed after the indirection  EA= (A)+(R)  Indexing is performed before the indirection  EA=(A+(R))
  • 20. Index Addressing  A= base  R= displacement  EA= A+R  Good for accessing arrays • EA= A+R • R++
  • 21. Stack Addressing • A stack is a linear array of locations • A stack is a reversed block of locations • Associated with the stack is a pointer whose value is the address of the top of the stack • Is a form of implied addressing • The machine instructions need not include a memory reference but implicity operate on the top of the stack  Sometimes referred to as a pushdown list or last-in-first queue.  Items are appended to the top of the top of the stack so that the block is partially filled  The stack pointer is maintained in a register  Thus references to stack locations in memory are in fact register indirect addresses
  • 22. Autoincrement/Autodecrement Mode • A special case od 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 incement. • 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 • 12 addressing modes available  Starting address plus offset gives linear address.  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 • Branch Address • Arithmetic 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 reference base register and index register (both may be GP)  ea is sum of contents,  Absolute  Relative  Indirect  Operands in register or part of instruction