VOOZH about

URL: https://www.geeksforgeeks.org/computer-organization-architecture/difference-between-direct-and-immediate-addressing-modes/

⇱ Difference between Direct and Immediate Addressing Modes - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Difference between Direct and Immediate Addressing Modes

Last Updated : 7 May, 2025

Whenever an instruction is executed, it requires the operands or data to operate on their own. There are different ways of accessing operands or data. Such methods are known as addressing modes. There are many addressing modes but in this article, we will learn about direct and immediate addressing modes. In direct addressing mode, the address field contains the address of the operand. While in immediate addressing mode, the operand is a part of the instruction.

Direct Addressing Mode

In this addressing mode, instructions will be contains operation code also known as opcode and address to the memory location where the operand is store. It means the operand's address is explicitly provided in the instructions.

Effective Address (EA) = Address field of operand

👁 direct-addressing
Direct Addressing

Example: Add the contents of register 1303 to the accumulator.

Add (1303)

Only a single memory reference is required to access data. So no additional calculations are required to work out the effective address. 

Advantages of Direct Addressing Mode

  • This mode is straightforward.
  • It is faster and simple than direct addressing mode.
  • It takes less space as compared to indirect mode.

Disadvantages of Direct Addressing Mode

  • Address space is restricted.
  • It is not flexible.

Immediate Addressing Modes

In this type of addressing mode, the instruction itself contain the operand and there is no need for search for it. In other words, operand is a part of instruction.

Operand = Address Field

👁 immediate-addressing
Immediate Addressing

Example: Add 3 to the accumulator.

ADD 3

No memory reference is required to fetch data. So, no additional calculations are required to work out the effective address. It is a fast method but it has a limited range.

Advantages of Immediate Addressing Modes

  • No need of extra memory access.
  • It provide fast execution.

Disadvantages of Immediate Addressing Modes

  • Limited size of operand.
  • First operand can not an immediate value.

Difference between Direct and Immediate Addressing Modes

ParametersDirect Addressing ModeImmediate Addressing Mode
Address FieldAddress fields contain the effective address of the operand.There is no address field as an operand is a part of the instruction. In place of address field, immediate addressing mode has operand field.
Memory ReferencingIt requires one reference to memory.It does not require any reference to memory.
Process SpeedIt is slower as compared to the immediate mode.It is faster as compared to the direct addressing mode.
RangeIt has more range than immediate mode.It has a limited range.
ExampleAdd (1303)ADD 3
AdvantageEasy as direct reference to memory There is no memory reference for fetching data.
DisadvantageRestricted address spaceConstrained operand magnitude
ApplicationIt assists in accessing static data and implementing variables.Set the register to a constant value.
Comment

Explore