Assembly Language Question: Consider the following instruction: 1w $s0, 4 (St0) Suppose the
register $t0 contains the value 12 before the above instruction is executed. After the above
instruction has been executed, the value of the register $s0 will be equal to the value stored in
which memory address (in decimal)?
Solution
The value of the register $s0 will be equal to the value stored in memory address 16 .
Explanation :
$t0 contains 12 value.
lw $s0,4($t0) => $s0 = value in address (4+ $t0) => $s0 = value in address (4+12) =>$s0 =
value in memory address 16

Assembly Language Question Consider the following instruction 1w .pdf

  • 1.
    Assembly Language Question:Consider the following instruction: 1w $s0, 4 (St0) Suppose the register $t0 contains the value 12 before the above instruction is executed. After the above instruction has been executed, the value of the register $s0 will be equal to the value stored in which memory address (in decimal)? Solution The value of the register $s0 will be equal to the value stored in memory address 16 . Explanation : $t0 contains 12 value. lw $s0,4($t0) => $s0 = value in address (4+ $t0) => $s0 = value in address (4+12) =>$s0 = value in memory address 16