The language is MIPS.
$s2 = 0x00000046 ; $s1 = 0x000038c
What will be the $s2 value in Hex after the following code ? :
add $s2, $s1, $s2
srl $s1, $s1, 4
or $s2, $s1, $s2
Can some one show me the way ?
thnx !
It might help to describe what each instruction does, e.g. in pseudo code, or here in C:
add $s2, $s1, $s2 # s2 = s1 + s2;
srl $s1, $s1, 4 # s1 = s1 >> 4;
or $s2, $s1, $s2 # s2 = s1 | s2;
User contributions licensed under CC BY-SA 3.0