
|
I Format Coding |
The R format instructions are the simplest. Consider,
sub $s2, $s3, $t1
- Look up the values of the registers
in the table on p. A-23:
$s2 is 18 = 100102, $s3 is 19 = 100112, and $t1 is 9 = 010012.
- Look up the instruction to find its type and format.
(You'll find it on p. A-59.) Plug the numbers into the format,
being careful to get the registers in the right places:
| 000000 | 10011 | 01001 | 10010 | 00000 | 100010 | |
- Regroup the bits.
| 0000 | 0010 | 0110 | 1001 | 1001 | 0000 | 0010 | 0010 | |
- Represent as a hex number: 02699022
|
I Format Coding |