Addressing modes and It's Types 


In this gate study material for computer science we are going to explain different types of addressing modes. We have examined the types of operands and operations that may be specified by machine instructions. Now we have to see how is the address of an operand specified, and how are the bits of an instruction organized to define the operand addresses and operation of that instruction.


The most common addressing techniques are

• Immediate
• Direct
• Indirect
• Register
• Register Indirect
• Displacement
• Stack

All computer architectures provide more than one of these addressing modes. The question arises as to how the control unit can determine which addressing mode is being used in a particular instruction. Several approaches are used. Often, different opcodes will use different addressing modes. Also, one or more bits in the instruction format can be used as a mode field. The value of the mode field determines which addressing mode is to be used.

What is the interpretation of effective address? In a system without virtual memory, the effective address will be either the main memory address or a register. In a virtual memory system, the effective address is a virtual address or a register. The actual mapping to a physical address is a function of the paging mechanism and is invisible to the programmer.




addressing modes in computer architecture based Computer Science Study Material for Gate

(1)   Immediate Addressing Mode

The simplest form of addressing is immediate addressing, in which the operand is actually present in the instruction:
OPERAND = A
This mode can be used to define and use constants or set initial values of variables. The advantage of immediate addressing is that no memory reference other than the instruction fetch is required to obtain the operand. The disadvantage is that the size of the number is restricted to the size of the address field, which, in most instruction sets, is small compared with the word length.

(2)   Direct Addressing Mode

A very simple form of addressing is direct addressing, in which the address field contains the effective address of the operand:
EA = A
It requires only one memory reference and no special calculation.

(3)   Indirect Addressing Mode

With direct addressing, the length of the address field is usually less than the word length, thus limiting the address range. One solution is to have the address field refer to the address of a word in memory, which in turn contains a full-length address of the operand. This is known as indirect addressing
EA = (A)
(4)   Register Direct Addressing Mode

Register addressing is similar to direct addressing. The only difference is that the address field refers to a register rather than a main memory address:
                                               EA = R
The advantages of register addressing are that only a small address field is needed in the instruction and no memory reference is required. The disadvantage of register addressing is that the address space is very limited.

(5)   Register Indirect Addressing Mode

Register indirect addressing is similar to indirect addressing, except that the address field refers to a register instead of a memory location. It requires only one memory reference and no special calculation.
EA = (R)
Register indirect addressing uses one less memory reference than indirect addressing. Because, the first information is available in a register which is nothing but a memory address. From that memory location, we use to get the data or information. In general, register access is much more faster than the memory access.

(6)   Displacement Addressing Mode

A very powerful mode of addressing combines the capabilities of direct addressing and register indirect addressing, which is broadly categorized as displacement addressing:
EA = A + (R)
Displacement addressing requires that the instruction have two address fields, at least one of which is explicit. The value contained in one address field (value = A) is used directly. The other address field, or an implicit reference based on opcode, refers to a register whose contents are added to A to produce the effective address.


Three of the most common use of displacement addressing are:
• Relative addressing
• Base-register addressing
• Indexing

(7)   Relative Addressing Mode

For relative addressing, the implicitly referenced register is the program counter (PC). That is, the current instruction address is added to the address field to produce the EA. Thus, the effective address is a displacement relative to the address of the instruction.

(8)   Base-Register Addressing Mode



The reference register contains a memory address, and the address field contains a displacement from that address. The register reference may be explicit or implicit. In some implementation, a single segment/base register is employed and is used implicitly. In others, the programmer may choose a register to hold the base address of a segment, and the instruction must reference it explicitly.

I hope this Computer Science Study Material for Gate will be helpful to Gate Aspirants in understanding the concept of addressing modes in computer architecture.

Keywords:  addressing modes in computer architecture, definition of address mode, types of addressing modes, types of addressing modes in computer architecture, types of addressing modes in computer architecture with example, types of addressing modes with example in computer architecture, various addressing modes in computer architecture, what is addressing mode in computer architecture?