Given this code:
[0x00000000] arraycopy: lw $t0, 0($a0)
[0x00000004] addi $a0, $a0,4
[0x00000008] addi $a1, $a1,4
[0x0000000C] sw $t0, -4($a1)
[0x00000010] bne $t0,$0,arraycopy
[0x00000014] Nop ( means no operation )
Now I'm interested to translate the bne command line to machine code:
What I got: 0001 0100 0000 1000 - ....
Now what will be the rest of the command?
**Update: I keep getting that the Offset value is: 1111 1111 1110 1100 which is -20
But the correct answer should be : 0xfffb which is -5
Any Idea why?**