Direct and Indirect addressing in memory

Icodewithben
2 min readFeb 1, 2024

Video explanation with PPQ example: https://youtu.be/PCeq7_5u0To

In an 8 bit machine code instruction 4 bits are the Opcode (what we want it to do) and 4 bits are the Operand (what number we are dealing with).

There are 4 types of addressing: Immediate, Direct, Indirect and Indexed addressing. See the slides below for a clear explanation and Craig and Dave Summary 35. OCR A Level (H446) SLR7–1.2 Addressing memory — YouTube:

Question

  • What values will end up in the accumulator using immediate, direct, indirect and indexed?
Write out a table and the answers in binary and then denary
  • Why would we use indirect addressing over direct addressing? Write your answer then we discuss….​

ANSWERS:

  • Indirect addressing is used when the exact memory address of a data item is not known. It is used to access data stored in memory indirectly, by using a pointer or an index. This allows for more flexibility in accessing data, as the exact memory address of the data item is not required. Additionally, indirect addressing can be used to access data stored in different memory locations, which can be useful when dealing with large data sets.

PPQ 2021:

Answer:

--

--