Question

Consider a hypothetical processor with an instruction of type LW R1, 20(R2), which during execution reads a 32-bit word from memory and stores it in a 32-bit register R1. The effective address of the memory location is obtained by the addition of a constant 20 and the contents of register R2. Which of the following best reflects the addressing mode implemented by this instruction for the operand in memory?

Choose one option
Official answer and solution
Official answer
D
From
Official GATE 2011 answer key

Solution

Identify addressing mode definitions where effective address equals base register contents plus an immediate offset.

  1. The instruction LW R1, 20(R2) computes the effective address as EA=contents(R2)+20\text{EA} = \text{contents}(R2) + 20.
  1. In computer architecture, an addressing mode where an address is formed by adding an immediate displacement (constant offset) to the contents of a base register is known as base-displacement or base indexed addressing.
  1. Option D (Base Indexed Addressing) represents this addressing format.
Final answer

D

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2011 Computer Science and Information Technology (CS)
Question
21 of 65, printed as CS Q.21
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.