Visualize how a CPU finds the data it needs.
As we write programs in high-level languages, we use data in many different ways: simple variables, arrays, pointers, linked lists, and struct/objects. The CPU needs the same flexibility to access this data efficiently. Addressing modes provide this flexibility. They are the bridge between how we structure data in code and how the CPU finds it in memory.
These are the most straightforward modes. The CPU can find the operand or its address with no extra addition or subtraction. The location is either implied, inside the instruction itself, or in a register.
These modes are more powerful and flexible. They require the CPU's Arithmetic Logic Unit (ALU) to perform a calculation to determine the final memory address of the operand. This is essential for working with data structures.
Description will appear here.
Welcome! Click a mode button to begin.
See how instructions combine to form programs.
Select a program to begin.
ALU operations change flags that control program branches.
V = Carry-in to MSB ⊕ Carry-out from MSB
(Cn-1)
(Cn)