SlideShare a Scribd company logo
1 of 22
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

11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes Sher Shah Merkhel
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycleKumar
 
Chapter 03 arithmetic for computers
Chapter 03   arithmetic for computersChapter 03   arithmetic for computers
Chapter 03 arithmetic for computersBảo Hoang
 
Computer Organisation - Addressing Modes
Computer Organisation - Addressing ModesComputer Organisation - Addressing Modes
Computer Organisation - Addressing ModesArunaDevi63
 
Computer Architecture and organization ppt.
Computer Architecture and organization ppt.Computer Architecture and organization ppt.
Computer Architecture and organization ppt.mali yogesh kumar
 
Memory reference instruction
Memory reference instructionMemory reference instruction
Memory reference instructionSanjeev Patel
 
Virtual memory
Virtual memoryVirtual memory
Virtual memoryAnuj Modi
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stackAsif Iqbal
 
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
 
Types of Addressing modes- COA
Types of Addressing modes- COATypes of Addressing modes- COA
Types of Addressing modes- COARuchi Maurya
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control Anuj Modi
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registersSanjeev Patel
 
Micro operation control of processor
Micro operation control of processorMicro operation control of processor
Micro operation control of processorMuhammad Ishaq
 
Unit-8-Computer-Arithmetic.pdf
Unit-8-Computer-Arithmetic.pdfUnit-8-Computer-Arithmetic.pdf
Unit-8-Computer-Arithmetic.pdfGafryMahmoud
 

What's hot (20)

Addressing modes
Addressing modesAddressing modes
Addressing modes
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
Instruction format
Instruction formatInstruction format
Instruction format
 
Addressing modes ppt
Addressing modes pptAddressing modes ppt
Addressing modes ppt
 
Chapter 03 arithmetic for computers
Chapter 03   arithmetic for computersChapter 03   arithmetic for computers
Chapter 03 arithmetic for computers
 
Computer Organisation - Addressing Modes
Computer Organisation - Addressing ModesComputer Organisation - Addressing Modes
Computer Organisation - Addressing Modes
 
Lecture 3 instruction set
Lecture 3  instruction setLecture 3  instruction set
Lecture 3 instruction set
 
Computer Architecture and organization ppt.
Computer Architecture and organization ppt.Computer Architecture and organization ppt.
Computer Architecture and organization ppt.
 
Memory reference instruction
Memory reference instructionMemory reference instruction
Memory reference instruction
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Presentation1
Presentation1Presentation1
Presentation1
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
 
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
 
Types of Addressing modes- COA
Types of Addressing modes- COATypes of Addressing modes- COA
Types of Addressing modes- COA
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registers
 
Micro operation control of processor
Micro operation control of processorMicro operation control of processor
Micro operation control of processor
 
Cache
CacheCache
Cache
 
Unit-8-Computer-Arithmetic.pdf
Unit-8-Computer-Arithmetic.pdfUnit-8-Computer-Arithmetic.pdf
Unit-8-Computer-Arithmetic.pdf
 

Similar to addressing modes

ADDRESSING MODES.pptx
ADDRESSING MODES.pptxADDRESSING MODES.pptx
ADDRESSING MODES.pptxKajalOberoi1
 
PPT on Addressing Modes.ppt.pptx
PPT on Addressing Modes.ppt.pptxPPT on Addressing Modes.ppt.pptx
PPT on Addressing Modes.ppt.pptxTushar Singhal
 
Compreport
CompreportCompreport
Compreportxdarlord
 
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
 
Addressing Modes.pptx
Addressing Modes.pptxAddressing Modes.pptx
Addressing Modes.pptxssuser1f2c12
 
Describe the three main addressing modes of the PIC16 architecture di.pdf
Describe the three main addressing modes of the PIC16 architecture di.pdfDescribe the three main addressing modes of the PIC16 architecture di.pdf
Describe the three main addressing modes of the PIC16 architecture di.pdfSALES97
 
BASIC COMPUTER ORGANIZATION AND DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGNBASIC COMPUTER ORGANIZATION AND DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGNAnonymous Red
 
instruction sets (1).pptx
instruction sets (1).pptxinstruction sets (1).pptx
instruction sets (1).pptxAmanMomin9
 
Addressing modes
Addressing modesAddressing modes
Addressing modesSelvi Suba
 
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
 

Similar to addressing modes (20)

ADDRESSING MODES.pptx
ADDRESSING MODES.pptxADDRESSING MODES.pptx
ADDRESSING MODES.pptx
 
PPT on Addressing Modes.ppt.pptx
PPT on Addressing Modes.ppt.pptxPPT on Addressing Modes.ppt.pptx
PPT on Addressing Modes.ppt.pptx
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
ADDRESSING MODES.pptx
ADDRESSING MODES.pptxADDRESSING MODES.pptx
ADDRESSING MODES.pptx
 
Compreport
CompreportCompreport
Compreport
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
 
Addressing Modes.pptx
Addressing Modes.pptxAddressing Modes.pptx
Addressing Modes.pptx
 
Instruction-Sets-2.pptx
Instruction-Sets-2.pptxInstruction-Sets-2.pptx
Instruction-Sets-2.pptx
 
Addressing Modes
Addressing ModesAddressing Modes
Addressing Modes
 
Describe the three main addressing modes of the PIC16 architecture di.pdf
Describe the three main addressing modes of the PIC16 architecture di.pdfDescribe the three main addressing modes of the PIC16 architecture di.pdf
Describe the three main addressing modes of the PIC16 architecture di.pdf
 
BASIC COMPUTER ORGANIZATION AND DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGNBASIC COMPUTER ORGANIZATION AND DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGN
 
instruction sets (1).pptx
instruction sets (1).pptxinstruction sets (1).pptx
instruction sets (1).pptx
 
Addressing mode
Addressing modeAddressing mode
Addressing mode
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Instruction Codes.pptx
Instruction Codes.pptxInstruction Codes.pptx
Instruction Codes.pptx
 
instruction format.pptx
instruction format.pptxinstruction format.pptx
instruction format.pptx
 
ADDRESSING MODE
ADDRESSING MODEADDRESSING MODE
ADDRESSING MODE
 
COA.pptx
COA.pptxCOA.pptx
COA.pptx
 
Address
AddressAddress
Address
 
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...
 

Recently uploaded

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 

Recently uploaded (20)

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 

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.