Project ForgeSign up free
Computer Organization & Architecture
Pipelining & Instruction Sets
GATE 2007
Hard

(Same program as before: MOV R1,(3000); LOOP: MOV R2,(R3); ADD R2,R1; MOV (R3),R2; INC R3; DEC R1; BNZ LOOP; HALT. M[3000]=10, R3 starts at 2000, M[2000..2010]=100 each.) Assume the memory is word addressable. After the execution of this program, the content of memory location 2010 is

  • 100
  • B101
  • C102
  • D110

Explanation

The loop runs 10 iterations, with R3 (address being read/written each iteration) going from 2000 up to 2009 (2000,2001,...,2009 across the 10 iterations, incrementing after each use). Memory location 2010 is never touched by the loop, so it retains its original, unchanged value of 100.

Source: GATE CS 2007 (2007)

This question is part of a 15-day revision cycle — sign in and Project Forge will bring it back the day before you'd forget it.

Start revising free