2.4.4

Modes of Addressing Memory

Test yourself

Modes of Addressing Memory

Programs can be coded to use direct types of memory address. This allows program instructions to access high numbers of memory locations for storing and retrieving data and instructions.

Illustrative background for Immediate addressingIllustrative background for Immediate addressing ?? "content

Immediate addressing

  • In immediate addressing, the opcode is the actual value to be used.
  • The binary opcode of 00000101 would give the value of 5 to the CPU to work with if we used the immediate addressing mode.
  • This is a way to give the data directly to the processor so it doesn’t need to access another memory location.
Illustrative background for Direct addressingIllustrative background for Direct addressing ?? "content

Direct addressing

  • In direct addressing, the opcode is the address for the memory location where the data can be found.
  • The instruction contains the memory address of the operand.
  • The value is not given directly. The CPU has to retrieve the value from the given memory location.
  • In Little Man Computer, this is the only type of addressing available.
Illustrative background for Indirect addressingIllustrative background for Indirect addressing ?? "content

Indirect addressing

  • In indirect addressing, the opcode is the location of the value to be used.
  • The instruction contains the address of a memory location that holds the actual address of the operand.
  • This is usually a register.
  • By using indirect addressing, the CPU can access a significantly higher number of addressable locations.
Illustrative background for Indexed addressingIllustrative background for Indexed addressing ?? "content

Indexed addressing

  • In indexed addressing, the opcode is one value that is added together with a value stored in the index register to give the location of the data to be used.
  • The index register value is a constant value that indicates the first memory location for an array of data items.
  • By adding the index register and the opcode value together, you get the address of the next location to get data from.

Jump to other topics

1Components of a Computer

2Software & Software Development

3Exchanging Data

4Data Types, Data Structures & Algorithms

5Legal, Moral, Cultural & Ethical Issues

6Elements of Computational Thinking

6.1Thinking Abstractly

6.2Thinking Procedurally

6.3Thinking Logically

7Problem Solving & Programming

8Algorithms

Go student ad image

Unlock your full potential with GoStudent tutoring

  • Affordable 1:1 tutoring from the comfort of your home

  • Tutors are matched to your specific learning needs

  • 30+ school subjects covered

Book a free trial lesson