addi   $s0, $s1,
2Â Â Â Â Â Â Â Â Â Â Â Â Â
I-format
ADDIÂ Â Â Â Â Â Â $s1Â Â
     $s0 Â
         Â
immediate
001000Â Â 10001Â Â 10000Â Â
0000000000000010
Binary = 00100010001100000000000000000010
---------------------------------------------------------------------------------
lw      $s1,
4($s1)Â Â Â Â
I-Format
LWÂ Â Â Â Â Â Â Â Â
$s1Â Â Â Â Â Â Â Â
$s1Â Â
           Â
offset
100011Â Â 10001Â Â 10001Â Â
0000000000000100
Binary = 10001110001100010000000000000100
---------------------------------------------------------------------------------
bne    $s1, $t1, loop
I-Format:
BNEÂ Â Â Â Â Â Â Â Â
$s1Â Â Â Â Â Â Â $t1Â Â
  offset
000101Â Â 10001Â Â 01001Â Â
0000000000000010
Binary = 00010110001010010000000000000010
---------------------------------------------------------------------------------
jal
leaf                    Â
0x20000 >> 2 =
0x01000Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
J-Format
JALÂ Â
                    Â
target
000011Â Â 00000000000001000000000000
Binary : 00001100000000000001000000000000
---------------------------------------------------------------------------------
sub    $t1, $s6, $0
R-type
opcode  $s6   Â
$zero  $t1     Â
shamt  SUB
000000Â Â 10110Â Â 00000Â Â
01001Â Â 00000Â Â 100010
Binary: 00000010110000000100100000100010