Saturday, 15 January 2022

Addressing Modes

The operation field of an instruction specifies the operation to be performed. This operation must be executed on some data stored in computer registers or memory words. The way the operands are choosen during program execution is dependent on the addressing mode of the instruction.

The control unit of a computer is designed to go through an instruction cycle that is divided into three major phases:

        1. Fetch the instruction from memory.
        2. Decode the instruction. 
        3. Execute the instruction. 

Addressing modes are as :

1.Implied Mode:

Address of the operands are specified implicitly in the definition of the instruction. No need to specify address in the instruction. Zero-address instructions in a stack-organized computer are implied-mode instructions since the operands it self performs on top of the stack.

2.Immediate Mode:

In immediate mode the operand is specified in the instruction itself. In other words, an immediate-mode instruction has an operand field rather than an address field. The operand field contains the actual operand to be used in conjunction with the operation specified in the instruction. Immediate-mode instructions are useful for initializing registers to a constant value. 

3.Register Mode:

The operands are stored in registers which are in CPU. The particular register is selected from a register field in the instruction. A k-bit field can specify any one of 2k registers.

4.Register Indirect Mode:

In this mode the instruction specifies a register in the CPU whose contents give the address of the operand in memory. In other words, the selected register contains the address of the operand rather than the operand itself. The advantage of a register indirect mode instruction is that the address field of the instruction uses fewer bits to select a register than would have been required to specify a memory address directly.

5.Auto-increment or Auto-decrement features:

This is similar to the register indirect mode except that the register is incremented or decremented after (or before) its value is used to access memory. When the address stored in the register refers to a table of data in memory, it is necessary to increment or decrement the register after every access to the table. This can be achieved by using the increment or decrement instruction. 

6.Direct Address Mode:

Instruction specifies the memory address which can be used directly to the physical memory. Faster than the other memory addressing modes. But the disadvantage is too many bits are needed to specify the address for a large physical memory space.

7.Indirect Mode:

In this mode the address field of the instruction gives the address where the effective address is stored in memory. Control fetches the instruction from memory and uses its address part to access memory again to read the effective address.


Post a Comment

Note: only a member of this blog may post a comment.

Find Us On Facebook

python tutorial


C Programming


Java Tutorial


Data Structures


MS Office


Database Management