Addressing Modes (original) (raw)

Last Updated : 11 Apr, 2026

Addressing modes are techniques used by the CPU to identify the location of the operand(s) needed for executing an instruction. They provide rules for interpreting the address field in an instruction, helping the CPU fetch operands correctly.

Addressing_Modes_1

Addressing Modes Types

**Implicit (Implied) Addressing

The instruction does not mention the operand directly. The CPU knows what to use from the instruction itself, usually a special register like the accumulator or the stack.

Addressing_Modes_2

It is used for special instructions or control commands like CLA, PUSH, and RET, where the operand is automatically known from the instruction itself

**Immediate Addressing

The operand is the part of the instruction itself. It is used when the value is known while writing the program.

immediate_addressing

**Example: MOV R1, #5 moves the value 5 into register R1, where #5 is the immediate value.

**Direct Addressing

The instruction contains the memory address of the operand. The CPU accesses the data directly from that address.

direct_addressing-

**Example: LOAD R1, 1000 loads data from memory address 1000 into register R1.

**Indirect Addressing

The instruction contains the address of a memory location, which itself stores the actual address of the operand. The CPU first accesses this memory location to get the effective address, and then fetches the operand.

indirect_addressing-

**Example: LOAD R1, (A) Loads data from the memory location whose address is stored at memory location **A.

**Register Addressing

The operand is located in a CPU register specified by the instruction.

register_addressing

**Step:

**Example: MOVA, BCopies data from register B to register A.

**Register Indirect Addressing

The register specified in the instruction contains the memory address of the operand.

**Steps:

register_indirect_addressing

**Example: LOAD R1, (R2). Loads data from the memory location whose address is stored in **register R2.

**Displacement Addressing (Indexed, Base-Register, Relative)

The operand’s effective address is calculated by adding a constant value (displacement) to the contents of one or more registers.

displacement_addressing

**Step:

**Example: Used for arrays, accessing an element at a position relative to a base.

**Stack Addressing

The operand is implicitly taken from the top of the stack, without being mentioned in the instruction.

stack_addressing

**Step:

**Example: POP and PUSH operations.