title: Machine instructions and memory address
body: <p>This is actually a examination question, i have doubts , i need to know the correct answer and explanation.</p>
  
  <p>Common Questions 1 and 2.</p>
  
  <pre><code>     INSTRUCTION                         INSTRUCTION SIZE (word)
      MOV R1 LOC1                            2
      MOV R2 #01                             1
      ADD R1 R2                              1
      MOV LOC2,R1                            2
      Halt                                   1
  </code></pre>
  
  <p>Q1. consider that the memory is byte addressable with size 32 bits , and the program has been loaded starting from memory location 1000 (decimal). CPU has been halted after executing the Halt instruction, the return address saved in the stack will be </p>
  
  <p>a) 1007  </p>
  
  <p>b) 1020</p>
  
  <p>c) 1024</p>
  
  <p>d) 1028             </p>
  
  <p>// i know that during the execution of any instruction , Program Count (PC register), incremented.  so when halt instruction is executed , the PC value should be 1028 but correct ans is c) , i'm not sure. please help to find correct answer.</p>
  
  <p>Q2. If CPU is 32 bit , word addressable , program is loaded form starting address 1000. If interrupt occurs during the ADD instruction, what will be the return address pushed on to the stack.</p>
  
  <p>a) 1007</p>
  
  <p>b) 1004</p>
  
  <p>c) 1005</p>
  
  <p>d) 1016</p>