SlideShare a Scribd company logo
PRESENTED BY:
SYEDA RIDA FATIMA TAQVI
Addressing Modes
Addressing mode:
The different ways in which the
location of an operand is
specified in an instruction are
addressing modes.
Instruction Cycle & PC :
 The control unit of a computer is designed to go through an
instruction cycle that is divided into three major phases:
-Fetch the instruction.
-Decode the instruction.
-Execute the instruction.
 PC (program counter) is a register that keeps track of the
instructions in the program stored in the memory. PC holds
the address of the instruction to be executed next and is
incremented each time an instruction is fetched from
memory.
Instruction Format:
An example of an instruction format
• Operation code field defines the operation to be performed.
• Mode field is used to locate the operands needed for the operation.
• Address field designate a memory address or a register .
but there may or may not be an address field in the
instruction . If there is an address field it designate a memory
address or processor register.
opcode Mode Address
Modes that need no address field:
There are different addressing modes (10)
Although most addressing modes modify the address field of
the instruction, there are two modes that need no address field
at all.
These are
 Implied mode
 Immediate mode
1-Implied mode:
In this mode the operands are specified implicitly in
the definition of the instruction.
for example: zero address instruction in stack
organized CPU the operation type instruction do
not need an address field. The instruction
ADD
in a stack computer consists of an operation code only
with no address field .There is no need to specify
operands with an address field since all operands are
implied to be in the stack.
2-Immediate Addressing Mode:
In this mode the operand itself specified in the instruction .
In other words
An immediate mode instruction has an
operand rather than an address field . The
operand field contain the actual operand to be
used.
for example:
MOV R # 20
This instruction is used to initialize a register to a
constant.
When the address field specify a processor register the
instruction is said to be in the register mode.
In the register mode the operands are in registers
that resides inside the CPU.
for example:
MOV R1 , R2
R2
opcode Register name
operand
4-Register Indirect Mode:
In this mode the instruction specifies register in the CPU whose content give
the address of the operand in the memory.
OR
The selected register contain the address of the register rather than operand
itself .
for example:
MOV A , (R) ( this notation identify
R do not contain the
operand it contain the
R address of operand )
memory
• Used in pointers.
opcode Reg name
Memory
address
operand
5-Autoincrement/Autodecrement Mode:
In this mode E.A of the operand is the content of register specified in
instruction , after / before accessing the operand the content of the
register are automatically incremented/decremented to the step size
d.
 This mode is similar to the register indirect mode except that the
register is incre /decr after it’s value is used.
 For example: ADD R1,(R2)+ memory
E.A=[R] 1000
E.A=[R]+d R 1001
E.A=[R]+2d 1002
• This mode is used in loop counter. 1003
opcode R
E.A(1003)
operand
6-Direct Addressing Mode:
In this mode E.A / address of operand directly given I n
instruction.
In this mode the effective address is equal to the address
part of the instruction the operand resides in memory and its
address is given directly by the address field of the instruction.
for example: ADD R , 2000 E.A
r r+[2000]
opcode E.A
Operand
value
7-Indirect Addressing Mode:
In this mode address field of an instruction give the address where the E.A is
stored in memory . Control fetch the instruction from memory and uses its
address part to access memory again to read the E.A.
Example:
memory
memory
opcode
Memory
address
E.A
operand
A few addressing modes require that the address field
of the instruction be added to the content of a specific
register in the CPU the effective address in these
modes is obtained from the following computation:
E.A = address part of the instruction
+ content of CPU register
The CPU register used in the computation may be the
PC(program counter),Index register , Base register.
In either case we have different
addressing modes.
These modes are:
1-Relative Address Mode
2-Indexed Addressing Mode
3-Base Register Addressing Mode
8-Relative Address mode (relative to PC):
In this mode the content of the PC is added to the address part of instruction
in order to obtain the effective address.
PC
+ E.A = A + B
Instruction PC
E.A=2000+1002
E.A= 3002
opcode address(A)
B
opcode 2000
1002
9-Index Addressing Mode:
In this mode the content of an index register is added
to the address part of the instruction to obtain the
effective address.
• Base Register : It is a special CPU register that contains an index value.
• Address field of the instruction defines the beginning address of data are
in memory.
• Each operand in array is stored in memory relative to the beginning
address.
• The distance b/w the beginning address and the address of the operand is
the index value stored in the register .
Example:
Instruction IR
1000
1000 1001 1002 1003 1004
[A]
0 1 2 3 4
E.A=1000+3
This type of address mode used to access array element.
opcode
Memory add /base
address
3
operand
10-Base Register Addressing Mode:
In this mode the content of a base register is added to the
address part of the instruction to obtain the effective address.
• This mode is similar to index addressing Mode except that the
register is now called a base register instead of an index
register.
• The diff b/w these modes is in the way they are used rather
than in the way they are computed.
• An index register is assumed to hold an index number that is
relative to the address part.
• A base register is assumed to hold a base address and the
address field of the instruction give a displacement relative to
this base address.
Example:
base register
E.A=A+B
base register
E.A=4+1000
E.A=1004
opcode
Displacement(
A)
Base
address(B)
opcode 4
1000
Why Addressing Modes are used:
Computer use addressing mode techniques for the purpose
of giving programming versatility to the user by providing
such facilities:
1-as pointer to memory.
2-as counters for loop controls.
3-indexing of data.
4-Program relocation.
5-to reduce the number of bits in the addressing
field of the instruction.
ADDRESSING MODES

More Related Content

What's hot (20)

PPTX
Types of Instruction Format
Dhrumil Panchal
 
PPT
Instruction cycle
shweta-sharma99
 
PPTX
General register organization (computer organization)
rishi ram khanal
 
PPTX
Storage Class in C Progrmming
Kamal Acharya
 
PPTX
8279 PKDI
deval patel
 
PPT
8259 updated
jemimajerome
 
PPTX
Instruction Set of 8086 Microprocessor
Ashita Agrawal
 
PPTX
INTERRUPTS OF 8086 MICROPROCESSOR
Gurudev joshi
 
PPTX
Register Reference Instructions | Computer Science
Transweb Global Inc
 
PPT
Microprocessor 80386
yash sawarkar
 
PDF
PAI Unit 2 Protection in 80386 segmentation
KanchanPatil34
 
PPTX
8257 DMA Controller
ShivamSood22
 
PPT
Assembly Language Programming Of 8085
techbed
 
PDF
1-AVR Introduction to Atmega32 good .pdf
KSRaviKumarMVGREEE
 
PPT
pin-diagram-details-of-8086-microprocessor
barsharoy19
 
PPTX
Computer instruction
Sanjeev Patel
 
PPTX
Floating point representation
missstevenson01
 
PPTX
80386 & 80486
RakeshKumarSharma46
 
PPTX
block diagram of 8086
asrithak
 
Types of Instruction Format
Dhrumil Panchal
 
Instruction cycle
shweta-sharma99
 
General register organization (computer organization)
rishi ram khanal
 
Storage Class in C Progrmming
Kamal Acharya
 
8279 PKDI
deval patel
 
8259 updated
jemimajerome
 
Instruction Set of 8086 Microprocessor
Ashita Agrawal
 
INTERRUPTS OF 8086 MICROPROCESSOR
Gurudev joshi
 
Register Reference Instructions | Computer Science
Transweb Global Inc
 
Microprocessor 80386
yash sawarkar
 
PAI Unit 2 Protection in 80386 segmentation
KanchanPatil34
 
8257 DMA Controller
ShivamSood22
 
Assembly Language Programming Of 8085
techbed
 
1-AVR Introduction to Atmega32 good .pdf
KSRaviKumarMVGREEE
 
pin-diagram-details-of-8086-microprocessor
barsharoy19
 
Computer instruction
Sanjeev Patel
 
Floating point representation
missstevenson01
 
80386 & 80486
RakeshKumarSharma46
 
block diagram of 8086
asrithak
 

Similar to ADDRESSING MODES (20)

PPTX
ADDRESSING MODES.pptx
KajalOberoi1
 
PPTX
PPT on Addressing Modes.ppt.pptx
Tushar Singhal
 
PPTX
a-m-170612075909.pptx download by student
debmalyachaki5
 
PPTX
Introduction to Addressing modes in computer memory.pptx
olisahchristopher
 
PPTX
UNDERSTANDING ADDRESSING MODES1 IN THE CPU.pptx
olisahchristopher
 
PPTX
ADDRESSING MODES.pptx
V.V.Vanniaperumal College for Women
 
PPTX
ITEC582-Chapter 13-CO-UNIT-1-IMPORT.pptx
VaidehiSuthar3
 
PPTX
ITEC582-Chapter 13-usefull-Computer.pptx
VaidehiSuthar3
 
PPTX
Addressing modes
Mukta Garg
 
PPTX
module 3 instruction set and control unit
sindhujam30
 
PPT
Compreport
xdarlord
 
PPTX
Instruction Formats in computer architecture.pptx
tgoswami1907
 
PDF
Unit II arm 7 Instruction Set
Dr. Pankaj Zope
 
PPTX
Addressing Modes.pptx
ssuser1f2c12
 
PPTX
Instruction-Sets-2.pptx
ClaivemaxGonzales
 
PPTX
Addressing modes ppt
sanjay pachauri
 
PPTX
ARM-7 ADDRESSING MODES INSTRUCTION SET
SasiBhushan22
 
PPTX
Addressing Modes
AnkonGopalBanik
 
PDF
Describe the three main addressing modes of the PIC16 architecture di.pdf
SALES97
 
PDF
BASIC COMPUTER ORGANIZATION AND DESIGN
Anonymous Red
 
ADDRESSING MODES.pptx
KajalOberoi1
 
PPT on Addressing Modes.ppt.pptx
Tushar Singhal
 
a-m-170612075909.pptx download by student
debmalyachaki5
 
Introduction to Addressing modes in computer memory.pptx
olisahchristopher
 
UNDERSTANDING ADDRESSING MODES1 IN THE CPU.pptx
olisahchristopher
 
ITEC582-Chapter 13-CO-UNIT-1-IMPORT.pptx
VaidehiSuthar3
 
ITEC582-Chapter 13-usefull-Computer.pptx
VaidehiSuthar3
 
Addressing modes
Mukta Garg
 
module 3 instruction set and control unit
sindhujam30
 
Compreport
xdarlord
 
Instruction Formats in computer architecture.pptx
tgoswami1907
 
Unit II arm 7 Instruction Set
Dr. Pankaj Zope
 
Addressing Modes.pptx
ssuser1f2c12
 
Instruction-Sets-2.pptx
ClaivemaxGonzales
 
Addressing modes ppt
sanjay pachauri
 
ARM-7 ADDRESSING MODES INSTRUCTION SET
SasiBhushan22
 
Addressing Modes
AnkonGopalBanik
 
Describe the three main addressing modes of the PIC16 architecture di.pdf
SALES97
 
BASIC COMPUTER ORGANIZATION AND DESIGN
Anonymous Red
 
Ad

Recently uploaded (20)

PPTX
The Toxic Effects of Aflatoxin B1 and Aflatoxin M1 on Kidney through Regulati...
OttokomaBonny
 
PDF
Renewable Energy Resources (Solar, Wind, Nuclear, Geothermal) Presentation
RimshaNaeem23
 
PPTX
Q1_Science 8_Week4-Day 5.pptx science re
AizaRazonado
 
PPT
1a. Basic Principles of Medical Microbiology Part 2 [Autosaved].ppt
separatedwalk
 
PDF
Approximating manifold orbits by means of Machine Learning Techniques
Esther Barrabés Vera
 
PPTX
Metabolismo de Purinas_2025_Luis Alvarez_Biomoleculas 2
Cinvestav
 
PPTX
Graduation Project 2025 mohamed Tarek PT
midotarekss12
 
PPTX
Reticular formation_nuclei_afferent_efferent
muralinath2
 
PDF
Multiwavelength Study of a Hyperluminous X-Ray Source near NGC6099: A Strong ...
Sérgio Sacani
 
PPTX
Quality control test for plastic & metal.pptx
shrutipandit17
 
PPTX
Brain_stem_Medulla oblongata_functions of pons_mid brain
muralinath2
 
PPTX
Role of GIS in precision farming.pptx
BikramjitDeuri
 
PPTX
The Obesity Paradox. Friend or Foe ?pptx
drdgd1972
 
PPTX
Feeding stratagey for climate change dairy animals.
Dr.Zulfy haq
 
PPT
Grade_9_Science_Atomic_S_t_r_u_cture.ppt
QuintReynoldDoble
 
PDF
Control and coordination Class 10 Chapter 6
LataHolkar
 
PPTX
METABOLIC_SYNDROME Dr Shadab- kgmu lucknow pptx
ShadabAlam169087
 
PDF
The steady state population of Earth’s minimoons of lunar provenance
Sérgio Sacani
 
DOCX
Echoes_of_Andromeda_Partial (1).docx9989
yakshitkrishnia5a3
 
PPT
1. Basic Principles of Medical Microbiology Part 1.ppt
separatedwalk
 
The Toxic Effects of Aflatoxin B1 and Aflatoxin M1 on Kidney through Regulati...
OttokomaBonny
 
Renewable Energy Resources (Solar, Wind, Nuclear, Geothermal) Presentation
RimshaNaeem23
 
Q1_Science 8_Week4-Day 5.pptx science re
AizaRazonado
 
1a. Basic Principles of Medical Microbiology Part 2 [Autosaved].ppt
separatedwalk
 
Approximating manifold orbits by means of Machine Learning Techniques
Esther Barrabés Vera
 
Metabolismo de Purinas_2025_Luis Alvarez_Biomoleculas 2
Cinvestav
 
Graduation Project 2025 mohamed Tarek PT
midotarekss12
 
Reticular formation_nuclei_afferent_efferent
muralinath2
 
Multiwavelength Study of a Hyperluminous X-Ray Source near NGC6099: A Strong ...
Sérgio Sacani
 
Quality control test for plastic & metal.pptx
shrutipandit17
 
Brain_stem_Medulla oblongata_functions of pons_mid brain
muralinath2
 
Role of GIS in precision farming.pptx
BikramjitDeuri
 
The Obesity Paradox. Friend or Foe ?pptx
drdgd1972
 
Feeding stratagey for climate change dairy animals.
Dr.Zulfy haq
 
Grade_9_Science_Atomic_S_t_r_u_cture.ppt
QuintReynoldDoble
 
Control and coordination Class 10 Chapter 6
LataHolkar
 
METABOLIC_SYNDROME Dr Shadab- kgmu lucknow pptx
ShadabAlam169087
 
The steady state population of Earth’s minimoons of lunar provenance
Sérgio Sacani
 
Echoes_of_Andromeda_Partial (1).docx9989
yakshitkrishnia5a3
 
1. Basic Principles of Medical Microbiology Part 1.ppt
separatedwalk
 
Ad

ADDRESSING MODES

  • 3. Addressing mode: The different ways in which the location of an operand is specified in an instruction are addressing modes.
  • 4. Instruction Cycle & PC :  The control unit of a computer is designed to go through an instruction cycle that is divided into three major phases: -Fetch the instruction. -Decode the instruction. -Execute the instruction.  PC (program counter) is a register that keeps track of the instructions in the program stored in the memory. PC holds the address of the instruction to be executed next and is incremented each time an instruction is fetched from memory.
  • 5. Instruction Format: An example of an instruction format • Operation code field defines the operation to be performed. • Mode field is used to locate the operands needed for the operation. • Address field designate a memory address or a register . but there may or may not be an address field in the instruction . If there is an address field it designate a memory address or processor register. opcode Mode Address
  • 6. Modes that need no address field: There are different addressing modes (10) Although most addressing modes modify the address field of the instruction, there are two modes that need no address field at all. These are  Implied mode  Immediate mode
  • 7. 1-Implied mode: In this mode the operands are specified implicitly in the definition of the instruction. for example: zero address instruction in stack organized CPU the operation type instruction do not need an address field. The instruction ADD in a stack computer consists of an operation code only with no address field .There is no need to specify operands with an address field since all operands are implied to be in the stack.
  • 8. 2-Immediate Addressing Mode: In this mode the operand itself specified in the instruction . In other words An immediate mode instruction has an operand rather than an address field . The operand field contain the actual operand to be used. for example: MOV R # 20 This instruction is used to initialize a register to a constant.
  • 9. When the address field specify a processor register the instruction is said to be in the register mode. In the register mode the operands are in registers that resides inside the CPU. for example: MOV R1 , R2 R2 opcode Register name operand
  • 10. 4-Register Indirect Mode: In this mode the instruction specifies register in the CPU whose content give the address of the operand in the memory. OR The selected register contain the address of the register rather than operand itself . for example: MOV A , (R) ( this notation identify R do not contain the operand it contain the R address of operand ) memory • Used in pointers. opcode Reg name Memory address operand
  • 11. 5-Autoincrement/Autodecrement Mode: In this mode E.A of the operand is the content of register specified in instruction , after / before accessing the operand the content of the register are automatically incremented/decremented to the step size d.  This mode is similar to the register indirect mode except that the register is incre /decr after it’s value is used.  For example: ADD R1,(R2)+ memory E.A=[R] 1000 E.A=[R]+d R 1001 E.A=[R]+2d 1002 • This mode is used in loop counter. 1003 opcode R E.A(1003) operand
  • 12. 6-Direct Addressing Mode: In this mode E.A / address of operand directly given I n instruction. In this mode the effective address is equal to the address part of the instruction the operand resides in memory and its address is given directly by the address field of the instruction. for example: ADD R , 2000 E.A r r+[2000] opcode E.A Operand value
  • 13. 7-Indirect Addressing Mode: In this mode address field of an instruction give the address where the E.A is stored in memory . Control fetch the instruction from memory and uses its address part to access memory again to read the E.A. Example: memory memory opcode Memory address E.A operand
  • 14. A few addressing modes require that the address field of the instruction be added to the content of a specific register in the CPU the effective address in these modes is obtained from the following computation: E.A = address part of the instruction + content of CPU register The CPU register used in the computation may be the PC(program counter),Index register , Base register.
  • 15. In either case we have different addressing modes. These modes are: 1-Relative Address Mode 2-Indexed Addressing Mode 3-Base Register Addressing Mode
  • 16. 8-Relative Address mode (relative to PC): In this mode the content of the PC is added to the address part of instruction in order to obtain the effective address. PC + E.A = A + B Instruction PC E.A=2000+1002 E.A= 3002 opcode address(A) B opcode 2000 1002
  • 17. 9-Index Addressing Mode: In this mode the content of an index register is added to the address part of the instruction to obtain the effective address. • Base Register : It is a special CPU register that contains an index value. • Address field of the instruction defines the beginning address of data are in memory. • Each operand in array is stored in memory relative to the beginning address. • The distance b/w the beginning address and the address of the operand is the index value stored in the register .
  • 18. Example: Instruction IR 1000 1000 1001 1002 1003 1004 [A] 0 1 2 3 4 E.A=1000+3 This type of address mode used to access array element. opcode Memory add /base address 3 operand
  • 19. 10-Base Register Addressing Mode: In this mode the content of a base register is added to the address part of the instruction to obtain the effective address. • This mode is similar to index addressing Mode except that the register is now called a base register instead of an index register. • The diff b/w these modes is in the way they are used rather than in the way they are computed. • An index register is assumed to hold an index number that is relative to the address part. • A base register is assumed to hold a base address and the address field of the instruction give a displacement relative to this base address.
  • 21. Why Addressing Modes are used: Computer use addressing mode techniques for the purpose of giving programming versatility to the user by providing such facilities: 1-as pointer to memory. 2-as counters for loop controls. 3-indexing of data. 4-Program relocation. 5-to reduce the number of bits in the addressing field of the instruction.