I have implemented beq instruction for mips assembly language. As my understanding for beq instruction (beq $s, $t, i
), i can take on integer values or hex values. I have establish a bound for 16 bits integer value. I was wondering what is the bound for 16 bits hex values, so when i is too large (or too small?) it would output error before executing it. Following is beq instruction in binary.
Branch On Equal
beq $s, $t, i
0001 00ss ssst tttt iiii iiii iiii iiii
I tried (i > 0xffff) but it seems not cover all the cases. What should i do here? Thanks.