I have an exam coming up, and one of the practice problems was:
Assume that
$t0
contains the value0x12121212
and$t1
contains the address0x1000000
.Assume that the memory data, starting from address
0x1000000
is:88 77 66 55
.What will be the value of
$t0
after the following code is executed:lb $t0, 0($t1)
a)
0x00000088
b)0x88121212
c)0xffffff88
d)0x12121288
The answer I gave was a
, because the byte that the lb
instruction will read (by my understanding of what the instruction does) is 88. The 88 will then be stored in $t0
, thus the value will be 0x00000088
. But the answer given was c
. I feel like I have a fundamental misunderstanding about how lb
works - can someone please explain why the answer is c
?