Addressing Modes in Computer Organization

In this tutorial, we are going to learn about Addressing Modes in Computer Organization.

The phrase addressing modes refers to the manner we state an instruction’s operand. Before the execution of the operand, the addressing mode provides a rule for interpreting or altering the address field of the instruction.

Types of Addressing Modes in Computer Organization

Implied / Implicit Addressing Mode –

The operand is mentioned in the instruction itself in Implied addressing. Data is 8 bits or 16 bits long in this mode, and data is a part of the instruction. The Implied addressing mode is useful while designing zero address instructions. The “Complement Accumulator” instruction is an implied mode instruction, for instance.

Immediate Addressing Mode –

The operand is explicitly indicated in the instruction in this addressing method. An operand field replaces the address field and contains the operand. The value held in the accumulator will get an increment of 5 by using the ADD 5 command, for instance.

Direct Addressing Modes in Computer Organization –

The operand’s offset is specified as an 8 bit or 16 bit displacement element in the instruction. The 16 bit effective address of the data is part of the instruction in this addressing technique. To access the data, only one memory reference action is necessary. For example, the value in the accumulator will get an increment of the value at memory address X when we use ADD X.

Indirect Addressing Modes in Computer Organization –

The address of the effective address is there in the address field of the instruction in this manner. There is a requirement of two references in this case. The first resource for obtaining an effective address. To get to the data, you’ll need a second reference. For example, the value stored in the accumulator will have an incrementation by the value stored at the memory location given by X when you use ADD X.

Register Direct Addressing Mode –

The operand is contained in a register set in this addressing mode. The instruction’s address field refers to a CPU register that contains the operand. We can get the operand without requiring a memory reference. For example, ADD R will add the contents of register R to the value stored in the accumulator.

Register Indirect Addressing Mode –

The operand’s offset is there in any of the registers BX,BP,SI,DI as stated in the instruction in this addressing. The data’s effective address is in the base register or an index register that the instruction specifies. To access the data, two registration references are necessary. For example, ADD R will add the content of the memory address specified in register R to the value stored in the accumulator.

Relative Addressing Modes in Computer Organization –

We get the effective address of the operand by adding the content of the program counter to the address section of the instruction in this addressing method. Not to mention that the address of the next instruction for execution is always there in the program counter (PC). The value of the program counter increases immediately after retrieving the instruction’s address. Regardless of whether the fetched instruction has completed or not, the value grows.

Indexed Addressing Mode – 

The effective address of the operand is generally the addition the contents of the index register and the address section of the instruction, in this addressing style.

Base Register Addressing Mode –

To implement inter segment control transfer, we use the base register addressing mode. In this mode, the effective address is basically the addition of the value of the base register and the value of the address field. For instance, position independent codes are best written using the based register addressing technique.

Auto-Increment Addressing Mode –

After accessing the operand, the content of the register get an increment of step size ‘d’ under this addressing style. The step size ‘d’ is basically the size of the operand we are accessing. To get the operand, only one memory reference is necessary.

Auto-Decrement Addressing Mode – 

The content of the register get initial decrement of step size ‘d’ in this addressing style. The step size ‘d’ is nothing but the size of the operand. The operand is read after decrementing. To get the operand, only one memory reference is necessary.