SlideShare a Scribd company logo
1 of 12
1
TOPIC:
Computer Organization and Architecture
Addressing Modes
(Lectures 23-25)
By-
Dr. Bineet Kaur (Asst. Prof., DICE)
2
Addressing Modes
3
● The operation field of an instruction specifies the operation to be
performed.
● This operation must be executed on some data stored in computer
registers or memory words.
● The way the operands are chosen during program execution is
dependent on the addressing mode of the instruction.
● The addressing mode specifies a rule for interpreting or modifying the
address field of the instruction before the operand is actually
referenced.
● Computers use addressing mode techniques for the purpose of
accommodating one or both of the following provisions:
1. To give programming versatility to the user by providing such
facilities as pointers to memory, counters for loop control, indexing
of data, and program relocation.
2. To reduce the number of bits in the addressing field of the
instruction
Addressing Mode
4
● The operands are specified implicitly in the definition
of the instruction.
● Eg: CMA - Complement Accumulator.
● All register reference instructions that use an
accumulator are implied-mode instructions.
● Zero-address instructions in a stack-organized
computer are implied-mode instructions since the
operands are implied to be on top of the stack.
Implied Mode
5
● The operand is specified in the instruction itself.
● It has an operand field rather than an address field.
● The operand field contains the actual operand to be
used in conjunction with the operation specified in
the instruction.
● They are useful for initializing registers to a constant
value.
● Eg: ADD 7
Immediate Mode
6
Register Mode
● The address field specifies a
processor register.
● In this mode the operands are in
registers that reside within the CPU.
● The particular register is selected from
a register field in the instruction.
● A k-bit field can specify any one of 2k
registers.
● Eg: ADD R1
7
Register Indirect Mode
● The instruction specifies a register in
the CPU whose contents give the
address of the operand in memory.
● The selected register contains the
address of the operand rather than the
operand itself.
● Before using a register indirect mode
instruction, the programmer must
ensure that the memory address of the
operand is placed in the processor
register with a previous instruction.
● Advantage - The address field of the
instruction uses fewer bits to select a
register.
8
In case of auto-increment, the effective
address is 400 with operand 700. After
this it would be incremented to 401.
In case of auto-decrement, the effective
address is 399 and operand is 450.
Auto-increment
and Auto-
decrement
9
In case of direct addressing, the
effective address is 500 with operand
800.
In case of indirect addressing, the
effective address is 800 and operand is
300.
Direct and
Indirect Address
Mode
10
● Content of the program counter is
added to the address part of the
instruction in order to obtain the
effective address.
● This number is added to the content
of the program counter, producing
an effective address whose position
in memory is relative to the address
of the next instruction.
● Example:
PC contains the number 201
The address part of the instruction
contains the number 500.
The instruction at location 201 is
read from memory during the fetch
phase and the program counter is
then incremented by one to 202.
The effective address computation
for the relative address mode is
202+ 500= 702 and operand is 325.
Relative Mode
11
● Content of an index register is
added to the address part of the
instruction to obtain the effective
address.
● The index register is a special CPU
register that contains an index
value.
● The address field of the instruction
defines the beginning address of a
data array in memory.
● The distance between the beginning
address and the address of the
operand is the index value stored in
the index register.
● The index register XR=100 which
gets added with address=500 i.e.
effective address is 100+500=600
and operand is 900.
Indexed
Addressing
12
Thank You

More Related Content

Similar to Addressing Modes.pptx

Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...
Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...
Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...preethi3173
 
Computer Organization and Design.pptx
Computer Organization and Design.pptxComputer Organization and Design.pptx
Computer Organization and Design.pptxSherinRappai
 
BASIC COMPUTER ORGANIZATION AND DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGNBASIC COMPUTER ORGANIZATION AND DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGNAnonymous Red
 
Addressing modes
Addressing modesAddressing modes
Addressing modesSelvi Suba
 
Addressing modes, Operations in the instruction set 1.2.3 (1).pptx
Addressing modes, Operations in the instruction set 1.2.3 (1).pptxAddressing modes, Operations in the instruction set 1.2.3 (1).pptx
Addressing modes, Operations in the instruction set 1.2.3 (1).pptxAmarRaj22
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction SetDr. Pankaj Zope
 
CS304PC:Computer Organization and Architecture Session 13 Addressing modes.pptx
CS304PC:Computer Organization and Architecture  Session 13 Addressing modes.pptxCS304PC:Computer Organization and Architecture  Session 13 Addressing modes.pptx
CS304PC:Computer Organization and Architecture Session 13 Addressing modes.pptxAsst.prof M.Gokilavani
 
Процессорын архитектур
Процессорын архитектурПроцессорын архитектур
Процессорын архитектурMuuluu
 
ITEC582-Chapter 12.pptx
ITEC582-Chapter 12.pptxITEC582-Chapter 12.pptx
ITEC582-Chapter 12.pptxSabaNaeem26
 
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
 
Comparison between RISC architectures: MIPS, ARM and SPARC
Comparison between RISC architectures: MIPS, ARM and SPARCComparison between RISC architectures: MIPS, ARM and SPARC
Comparison between RISC architectures: MIPS, ARM and SPARCApurv Nerlekar
 

Similar to Addressing Modes.pptx (20)

Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...
Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...
Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...
 
Instruction Codes.pptx
Instruction Codes.pptxInstruction Codes.pptx
Instruction Codes.pptx
 
ADDRESSING MODE
ADDRESSING MODEADDRESSING MODE
ADDRESSING MODE
 
Computer Organization and Design.pptx
Computer Organization and Design.pptxComputer Organization and Design.pptx
Computer Organization and Design.pptx
 
BASIC COMPUTER ORGANIZATION AND DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGNBASIC COMPUTER ORGANIZATION AND DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGN
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Addressing modes, Operations in the instruction set 1.2.3 (1).pptx
Addressing modes, Operations in the instruction set 1.2.3 (1).pptxAddressing modes, Operations in the instruction set 1.2.3 (1).pptx
Addressing modes, Operations in the instruction set 1.2.3 (1).pptx
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
 
instruction format.pptx
instruction format.pptxinstruction format.pptx
instruction format.pptx
 
Addressing modes ppt
Addressing modes pptAddressing modes ppt
Addressing modes ppt
 
Instruction-Sets-2.pptx
Instruction-Sets-2.pptxInstruction-Sets-2.pptx
Instruction-Sets-2.pptx
 
CS304PC:Computer Organization and Architecture Session 13 Addressing modes.pptx
CS304PC:Computer Organization and Architecture  Session 13 Addressing modes.pptxCS304PC:Computer Organization and Architecture  Session 13 Addressing modes.pptx
CS304PC:Computer Organization and Architecture Session 13 Addressing modes.pptx
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
 
Addressing Modes
Addressing ModesAddressing Modes
Addressing Modes
 
COA.pptx
COA.pptxCOA.pptx
COA.pptx
 
Процессорын архитектур
Процессорын архитектурПроцессорын архитектур
Процессорын архитектур
 
ITEC582-Chapter 12.pptx
ITEC582-Chapter 12.pptxITEC582-Chapter 12.pptx
ITEC582-Chapter 12.pptx
 
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)
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
 
Comparison between RISC architectures: MIPS, ARM and SPARC
Comparison between RISC architectures: MIPS, ARM and SPARCComparison between RISC architectures: MIPS, ARM and SPARC
Comparison between RISC architectures: MIPS, ARM and SPARC
 

Recently uploaded

Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 

Recently uploaded (20)

Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 

Addressing Modes.pptx

  • 1. 1 TOPIC: Computer Organization and Architecture Addressing Modes (Lectures 23-25) By- Dr. Bineet Kaur (Asst. Prof., DICE)
  • 3. 3 ● The operation field of an instruction specifies the operation to be performed. ● This operation must be executed on some data stored in computer registers or memory words. ● The way the operands are chosen during program execution is dependent on the addressing mode of the instruction. ● The addressing mode specifies a rule for interpreting or modifying the address field of the instruction before the operand is actually referenced. ● Computers use addressing mode techniques for the purpose of accommodating one or both of the following provisions: 1. To give programming versatility to the user by providing such facilities as pointers to memory, counters for loop control, indexing of data, and program relocation. 2. To reduce the number of bits in the addressing field of the instruction Addressing Mode
  • 4. 4 ● The operands are specified implicitly in the definition of the instruction. ● Eg: CMA - Complement Accumulator. ● All register reference instructions that use an accumulator are implied-mode instructions. ● Zero-address instructions in a stack-organized computer are implied-mode instructions since the operands are implied to be on top of the stack. Implied Mode
  • 5. 5 ● The operand is specified in the instruction itself. ● It has an operand field rather than an address field. ● The operand field contains the actual operand to be used in conjunction with the operation specified in the instruction. ● They are useful for initializing registers to a constant value. ● Eg: ADD 7 Immediate Mode
  • 6. 6 Register Mode ● The address field specifies a processor register. ● In this mode the operands are in registers that reside within the CPU. ● The particular register is selected from a register field in the instruction. ● A k-bit field can specify any one of 2k registers. ● Eg: ADD R1
  • 7. 7 Register Indirect Mode ● The instruction specifies a register in the CPU whose contents give the address of the operand in memory. ● The selected register contains the address of the operand rather than the operand itself. ● Before using a register indirect mode instruction, the programmer must ensure that the memory address of the operand is placed in the processor register with a previous instruction. ● Advantage - The address field of the instruction uses fewer bits to select a register.
  • 8. 8 In case of auto-increment, the effective address is 400 with operand 700. After this it would be incremented to 401. In case of auto-decrement, the effective address is 399 and operand is 450. Auto-increment and Auto- decrement
  • 9. 9 In case of direct addressing, the effective address is 500 with operand 800. In case of indirect addressing, the effective address is 800 and operand is 300. Direct and Indirect Address Mode
  • 10. 10 ● Content of the program counter is added to the address part of the instruction in order to obtain the effective address. ● This number is added to the content of the program counter, producing an effective address whose position in memory is relative to the address of the next instruction. ● Example: PC contains the number 201 The address part of the instruction contains the number 500. The instruction at location 201 is read from memory during the fetch phase and the program counter is then incremented by one to 202. The effective address computation for the relative address mode is 202+ 500= 702 and operand is 325. Relative Mode
  • 11. 11 ● Content of an index register is added to the address part of the instruction to obtain the effective address. ● The index register is a special CPU register that contains an index value. ● The address field of the instruction defines the beginning address of a data array in memory. ● The distance between the beginning address and the address of the operand is the index value stored in the index register. ● The index register XR=100 which gets added with address=500 i.e. effective address is 100+500=600 and operand is 900. Indexed Addressing