Just for some practice, do NOT submit.


Assume register $s0 has the value 0x10010000 and the following memory locations have the corresponding values: (Note all the values are in HEX or Hexadecimal).


Address               Value

0x1001000C        0x000000002

0x10010008         0x00000001C

0x10010004         0x000000033

0x10010000         0x0000000A2



We run the following code fragment:


lw $s1, 4($s0)

addi $s0, $s0,  4

lw $s2,  4($s0)

lw $s3, -4($s0)

sw $s2, 0 ($s0)

sw $s3, 8($s0)

sw $s1, -4($s0)


Write down:

  1. Values of the registers $s0 to $s3 after the execution of the program.
  2. Values and addresses of the memory locations that has changed