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:
Interpret the phrase 'relative to the beginning of the data structure' as base + offset.Identify the mode that adds an index to a base: index addressing.Validate that indirect addressing uses a pointed-to address without structured offset semantics.Select 'index' as the correct addressing mode.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