Difficulty: Easy
Correct Answer: index
Explanation:
Introduction / Context:
Addressing modes specify how the CPU computes the effective address of an operand. They are essential for working with arrays, records/structs, and tables. Correctly identifying an addressing mode helps in understanding how compilers layout data and how instructions fetch operands at runtime.
Given Data / Assumptions:
Concept / Approach:
Index addressing uses a base address (often the start of a data structure) plus an index or offset to calculate the effective address: EA = base + index. This maps directly onto array indexing and field offsets. Indirect addressing dereferences a pointer but does not by itself add a structure-relative offset unless combined with indexing.
Step-by-Step Solution:
Verification / Alternative check:
Common ISAs (x86 base+index+disp, ARM base+offset) implement index addressing for arrays and struct fields, reinforcing the choice.
Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:
index.
Discussion & Comments