Instructions & Addressing Modes

Answer & solution
Official answer: D
Givens and goal
X, Y and Z are memory locations. R0, R1 and R2 are registers. In a load-store architecture with destination-first syntax, select the instruction sequence implementing Z=X+Y. Options A–C use memory directly in an ADD; D loads X and Y, adds registers, and stores the result.
Approach
Separate data movement from arithmetic and trace where each value resides after every instruction.
Step-by-step solution
1. A load-store ISA permits ordinary arithmetic instructions to use registers, not arbitrary memory operands. First execute LOAD R0,X, giving R0=memory[X].
2. Execute LOAD R1,Y, giving R1=memory[Y]. Both operands of the addition are now available in registers.
3. Execute ADD R2,R0,R1. Destination-first syntax means R2 receives R0+R1; it does not mean R0 is overwritten.
4. Execute STORE Z,R2. This copies the sum from R2 to memory[Z], completing the high-level assignment. This four-instruction sequence is option D.
5. A tries ADD Z,X,Y with all three operands in memory. B loads only X and still uses memory for Y and the ADD destination. C computes ADD R0,X,Y without loading either source. These violate the stated load-store arithmetic restriction even if some other ISA might allow them.