GATE / CS ARCHIVE

GATE CSE 2011 / QUESTION 21

Base-plus-displacement addressing

Computer Organization & Architecture · Instructions & Addressing Modes · Full GATE CSE 2011 paper

GATE 2011, Q21 1 mark · MCQ
Report issue

Instructions & Addressing Modes

Question 21, GATE 2011: The instruction LW R1,20(R2) loads a 32-bit memory word into R1. Its effective address is 20 plus the contents of R2. Which listed addressing mode best describes the memory operand?

(A) Immediate addressing
(B) Register addressing
(C) Register indirect scaled addressing
(D) Base indexed addressing
Tap to enlarge
Your answer
Answer & solution

Official answer: D

The effective address is the content of R2 plus the displacement 20. The memory operand is neither the literal 20 nor a register value, and no scale factor is applied. Among the options this is called base indexed addressing, D; base-plus-displacement is a more precise description.

The operation can be written R1←Memory[R2+20]. Immediate addressing would use 20 itself as data; register addressing would take the operand directly from a register. Scaled indexing would multiply an index by an element size, which is absent here. Thus the listed base-indexed choice is the closest match. The memory word being 32 bits affects the load size, not the formula used to locate that word.

Original paper, page 5 · Answer key