Question
Consider a processor P whose instruction set architecture is the load-store architecture. The instruction format is such that the first operand of any instruction is the destination operand.
Which one of the following sequences of instructions corresponds to the high-level language statement Z = X + Y ?
Note: X, Y, and Z are memory operands. R0, R1, and R2 are registers.
Official answer and solution
- Official answer
- D
- From
- Official GATE 2026 answer key
Solution
Apply the rule of a load-store (RISC) architecture: only LOAD and STORE instructions may access memory; arithmetic instructions must operate solely on registers.
In a load-store architecture, arithmetic instructions such as ADD cannot take memory operands (X, Y, or Z) directly. Instead:
LOAD R0, Xloads memory operandXintoR0.LOAD R1, Yloads memory operandYintoR1.ADD R2, R0, R1adds registersR0andR1and places the sum into destination registerR2.STORE Z, R2stores the result fromR2into memory locationZ.
Option (D)
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2026 Computer Science and Information Technology - Session 1 (CS1)
- Question
- 15 of 65
- 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.