As we know that an instruction is composed of many fields. One most important field is the Address field. Since there are multiple ways that a computer uses to access the operands. Sometimes the operands are in memory, sometimes in registers. Along with that, sometimes operands are to be accessed in random fashion while sometimes to be accessed in a particular order. Keeping all these things in mind, several addressing modes are designed. The most important modes are as follows:
In this mode the address field doesn't store an address. Instead, the operand itself is provided implicitly in that field of instruction register.
This mode is peculiar in such a way that it also has no any address information. Instead it has a message for the control unit to listen to and perform accordingly. Usually the message is for AC like, Complement AC, Increment AC, Shift Right AC etc.
An address of certain memory location is given in the address field. The address is transferred to AR and the appropriate memory location is saught after for getting the operand.
This mode is very similar to the Direct mode but with one level of indirection. The address given in IR is saught after in the memory and what we get is not an operand, it is another adress. Now this address is effective address and moving on to this address, we get our operand.
The address given in IR is not a memory address. Instead, it is a register code which refers to a particular register. A k bit register code can refer a single register from a group of 2k registers. The operand is found in the referred register.
It is basically a combination of Register mode and Indirect Mode. The address found in IR is a register code which points to a register. The appropriate register now provides the effective address which is the address of a memory location. The operand is found finally in the memory.
The address found in IR is transferred to AR and from here, the address goes in two different ways- the one is to refer the memory and find the operand while other is to go through an Increment or Decrement circuit. Increment or Decrement is just to increase or decrease the address so that it can refer one next or one previous memory location back to back. This mode is preferable when many operands are to be fetched for just one instruction and all are stored one coniguous memory locations.
Indexed mode uses a sum of address in IR and the value of an Index register to produce the effective address. The value of Index register is regularly changed to produce different memory addresses while retaining the address in IR the same.
It is very similar to the Indexed mode. The address in IR is summed up with the value in Program Counter (PC) to produce the effective address. Using this address the operand is accessed from memory.