Addressing Modes-
The different ways of specifying the location of an operand in an instruction are called as addressing modes.
Types of Addressing Modes-
In computer architecture, there are following types of addressing modes-
- Implied / Implicit Addressing Mode
- Stack Addressing Mode
- Immediate Addressing Mode
- Direct Addressing Mode
- Indirect Addressing Mode
- Register Direct Addressing Mode
- Register Indirect Addressing Mode
- Relative Addressing Mode
- Indexed Addressing Mode
- Base Register Addressing Mode
- Auto-Increment Addressing Mode
- Auto-Decrement Addressing Mode
In this article, we will discuss about these addressing modes in detail.
1. Implied Addressing Mode-
In this addressing mode,
- The definition of the instruction itself specify the operands implicitly.
- It is also called as implicit addressing mode.
Examples-
- The instruction “Complement Accumulator” is an implied mode instruction.
- In a stack organized computer, Zero Address Instructions are implied mode instructions.
(since operands are always implied to be present on the top of the stack)
2. Stack Addressing Mode-
In this addressing mode,
- The operand is contained at the top of the stack.
Example-
ADD
- This instruction simply pops out two symbols contained at the top of the stack.
- The addition of those two operands is performed.
- The result so obtained after addition is pushed again at the top of the stack.
3. Immediate Addressing Mode-
In this addressing mode,
- The operand is specified in the instruction explicitly.
- Instead of address field, an operand field is present that contains the operand.
Examples-
- ADD 10 will increment the value stored in the accumulator by 10.
- MOV R #20 initializes register R to a constant value 20.
4. Direct Addressing Mode-
In this addressing mode,
- The address field of the instruction contains the effective address of the operand.
- Only one reference to memory is required to fetch the operand.
- It is also called as absolute addressing mode.
Example-
- ADD X will increment the value stored in the accumulator by the value stored at memory location X.
AC ← AC + [X]
5. Indirect Addressing Mode-
In this addressing mode,
- The address field of the instruction specifies the address of memory location that contains the effective address of the operand.
- Two references to memory are required to fetch the operand.
Example-
- ADD X will increment the value stored in the accumulator by the value stored at memory location specified by X.
AC ← AC + [[X]]
6. Register Direct Addressing Mode-
In this addressing mode,
- The operand is contained in a register set.
- The address field of the instruction refers to a CPU register that contains the operand.
- No reference to memory is required to fetch the operand.
Example-
- ADD R will increment the value stored in the accumulator by the content of register R.
AC ← AC + [R]
NOTE-
It is interesting to note-
- This addressing mode is similar to direct addressing mode.
- The only difference is address field of the instruction refers to a CPU register instead of main memory.
7. Register Indirect Addressing Mode-
In this addressing mode,
- The address field of the instruction refers to a CPU register that contains the effective address of the operand.
- Only one reference to memory is required to fetch the operand.
Example-
- ADD R will increment the value stored in the accumulator by the content of memory location specified in register R.
AC ← AC + [[R]]
NOTE-
It is interesting to note-
- This addressing mode is similar to indirect addressing mode.
- The only difference is address field of the instruction refers to a CPU register.
8. Relative Addressing Mode-
In this addressing mode,
- Effective address of the operand is obtained by adding the content of program counter with the address part of the instruction.
= Content of Program Counter + Address part of the instruction
NOTE-
- Program counter (PC) always contains the address of the next instruction to be executed.
- After fetching the address of the instruction, the value of program counter immediately increases.
- The value increases irrespective of whether the fetched instruction has completely executed or not.
9. Indexed Addressing Mode-
In this addressing mode,
- Effective address of the operand is obtained by adding the content of index register with the address part of the instruction.
= Content of Index Register + Address part of the instruction
10. Base Register Addressing Mode-
In this addressing mode,
- Effective address of the operand is obtained by adding the content of base register with the address part of the instruction.
= Content of Base Register + Address part of the instruction
11. Auto-Increment Addressing Mode-
- This addressing mode is a special case of Register Indirect Addressing Mode where-
= Content of Register
In this addressing mode,
- After accessing the operand, the content of the register is automatically incremented by step size ‘d’.
- Step size ‘d’ depends on the size of operand accessed.
- Only one reference to memory is required to fetch the operand.
Example-
Assume operand size = 2 bytes.
Here,
- After fetching the operand 6B, the instruction register RAUTO will be automatically incremented by 2.
- Then, updated value of RAUTO will be 3300 + 2 = 3302.
- At memory address 3302, the next operand will be found.
NOTE-
In auto-increment addressing mode,
- First, the operand value is fetched.
- Then, the instruction register RAUTO value is incremented by step size ‘d’.
12. Auto-Decrement Addressing Mode-
- This addressing mode is again a special case of Register Indirect Addressing Mode where-
= Content of Register – Step Size
In this addressing mode,
- First, the content of the register is decremented by step size ‘d’.
- Step size ‘d’ depends on the size of operand accessed.
- After decrementing, the operand is read.
- Only one reference to memory is required to fetch the operand.
Example-
Assume operand size = 2 bytes.
Here,
- First, the instruction register RAUTO will be decremented by 2.
- Then, updated value of RAUTO will be 3302 – 2 = 3300.
- At memory address 3300, the operand will be found.
NOTE-
In auto-decrement addressing mode,
- First, the instruction register RAUTO value is decremented by step size ‘d’.
- Then, the operand value is fetched.
Also Read- Practice Problems On Addressing Modes
Applications of Addressing Modes-
Addressing Modes | Applications |
Immediate Addressing Mode |
|
Direct Addressing Mode and Register Direct Addressing Mode |
|
Indirect Addressing Mode and Register Indirect Addressing Mode |
|
Relative Addressing Mode |
|
Index Addressing Mode |
|
Base Register Addressing Mode |
|
Auto-increment Addressing Mode and Auto-decrement Addressing Mode |
|
To gain better understanding about Addressing Modes,
Next Article- Syntax Of Addressing Modes
Get more notes and other study material of Computer Organization and Architecture.
Watch video lectures by visiting our YouTube channel LearnVidFun.
Summary
Article Name
Addressing Modes | Types of Addressing Modes
Description
In computer architecture, Addressing Modes specify the location of an operand. Types of Addressing Modes- Implied / Implicit Addressing Mode, Immediate Addressing Mode, Direct Addressing Mode, Indirect Addressing Mode, Register Direct Addressing Mode, Register Indirect Addressing Mode, Relative Addressing Mode, Indexed Addressing Mode, Base Register Addressing Mode, Auto-Increment Addressing Mode, Auto-Decrement Addressing Mode, Stack Addressing Mode
Author
Akshay Singhal
Publisher Name
Gate Vidyalay
Publisher Logo
FAQs
What are the 5 types of addressing modes? ›
...
Addressing Modes Types
- Implied Mode.
- Immediate Mode.
- Register Mode.
- Register Indirect Mode.
- Autodecrement Mode.
- Autoincrement Mode.
- Direct Address Mode.
- Indirect Address Mode.
What Is an Addressing Mode? The addressing mode is the method to specify the operand of an instruction. The job of a microprocessor is to execute a set of instructions stored in memory to perform a specific task. Operations require the following: The operator or opcode which determines what will be done.
What are the 4 addressing modes? ›The most common types of addressing modes are immediate, indirect, direct, indexed, and register addressing modes.
How many types of addressing mode are there? ›The different addressing modes in a microprocessor provide different ways in which the instruction specifies the address of the operand or the operand itself. There are five addressing modes in an 8085 microprocessor.
What are data addressing modes? ›An addressing mode specifies how to calculate the effective memory address of an operand by using information held in registers and/or constants contained within a machine instruction or elsewhere.
Which addressing mode is used? ›Direct Register Addressing Mode: In this mode, one of the operands is in registers, and the other is taken from memory. Direct Addressing Mode: In this mode, the address of the memory location that holds the operand is included in the instruction. The effective address is the address part of the instruction.
Is an example of addressing mode? ›In immediate addressing mode the source operand is always data. If the data is 8-bit, then the instruction will be of 2 bytes, if the data is of 16-bit then the instruction will be of 3 bytes. Examples: MVI B 45 (move the data 45H immediately to register B)
What is the difference between different types of addressing? ›The most significant difference between direct and indirect addressing modes is that the direct addressing mode requires only a single memory reference to obtain the data, whereas the indirect addressing mode requires two memory references to fetch the required data.
What is implied addressing mode? ›It is also known as “Inherent” or “Implicit” addressing mode. It is a type of addressing mode where no operand (data or memory location or register) is specified in the instruction. Also, in the implied mode, the operands are specified implicitly in the instruction definition.
What is direct and indirect addressing mode? ›The direct addressing mode contains the concerned operand in the instruction code's address field. In the case of an indirect addressing mode, the operand's address stays in the address field of any instruction. It requires no memory references for accessing the data.
Which addressing mode is faster? ›
Immediate addressing mode is comparatively faster than the direct mode.
Which addressing mode is best Why? ›11–1 Register addressing mode is the most efficient addressing mode because the operands are in the processor itself (there is no need to access memory). 11–2 Immediate addressing mode can be used to specify constants; thus, it cannot be used to specify the destination operand of an instruction.
Why do we use different addressing modes? ›Mostly to make efficient use of the (scarce) bits in instructions. Also (historically) to make the most of the limited number of transistors in a chip. Why are the addressing modes transparents when programming in high level languages?
What are the 6 different forms of address? ›A term of address may be friendly (dude, sweetheart), unfriendly (You idiot!), neutral (Jerry, Marge), respectful (Your honor), disrespectful (buddy, said with sarcasm), or comradely (My friends).
What are the types of address? ›HOME - Home address. BUSINESS - Business address. BILLING - Billing address. SHIPPING - Shipping address.
What are the three main types of IPv4 message addressing? ›IPv4 addresses are categorized into three basic types: unicast address, multicast address, and broadcast address.
What are the four addressing modes of 8085 give examples for each? ›- Immediate addressing mode. In this mode, the 8/16-bit data is specified in the instruction itself as one of its operand. ...
- Register addressing mode. ...
- Direct addressing mode. ...
- Indirect addressing mode. ...
- Implied addressing mode. ...
- Interrupt Service Routine (ISR) ...
- TRAP. ...
- RST7.
...
IPv6 Addressing
- Unicast addresses identify a single interface.
- Anycast addresses identify a set of interfaces in such a way that a packet sent to an anycast address is delivered to a member of the set.
1. countable noun [usually poss NOUN] Your address is the number of the house, flat, or apartment and the name of the street and the town where you live or work. The address is 2025 M Street, Northwest, Washington, DC, 20036.
What type of word is address? ›address (noun) address book (noun) forwarding address (noun)
What are the four 4 types addresses in TCP IP? ›
Four levels of addresses are used in an internet employing the TCP/IP protocols: physical address, logical address, port address, and application-specific address.
What are the 3 types of addresses in a network? ›There are four different types of IP addresses: public, private, static, and dynamic. While the public and private are indicative of the location of the network—private being used inside a network while the public is used outside of a network—static and dynamic indicate permanency.
What are the 4 parts of an IP address? ›The parts of your IP address
An IP address has two parts: the network ID, comprising the first three numbers of the address, and a host ID, the fourth number in the address. So on your home network — 192.168. 1.1, for example – 192.168. 1 is the network ID, and the final number is the host ID.
- Immediate addressing mode. ...
- Register addressing mode. ...
- Direct addressing mode. ...
- Register indirect addressing mode. ...
- Based addressing mode. ...
- Indexed addressing mode. ...
- Based-index addressing mode. ...
- Based indexed with displacement mode.
- Implied Mode − In this mode, the operands are specified implicitly in the definition of the instruction. ...
- Instruction format with mode field.
- Immediate Mode − In this mode, the operand is specified in the instruction itself.
IPv4 addresses are usually represented in dot-decimal notation, consisting of four decimal numbers, each ranging from 0 to 255, separated by dots. An IPv6 address is represented as eight groups of four hexadecimal digits, each group representing 16 bits. Fragmentation is performed only by the sender in IPv6.