I understand that 6,5,5,5,5,6 represent the number of bits as well, but how do they relate to the numbers 0,11,12,18,0 and x18?
Asked
Active
Viewed 53 times
-3
-
Those are the fields defined in the MIPS architecture, those fields are defined to be in that exact order with that exact bit length for each field, in other words, you just have to memorize them all – Trash Can Oct 02 '19 at 02:49
1 Answers
1
The 6,5,5,5,5,6 are the widths of the fields in an R-type instruction. This applies to all R-type instructions.
0,11,12,18,0 and 18 are the values encoded in those fields, in this specific example.
There is no relation, other than the field widths setting an upper bound on how large a number can be encoded in each field.
Also note, it's not really x18
, it's x
(the multiply operation, i.e. mult
instruction) which is encoded by the number 18 (i.e. the bit-pattern 011000
).

Peter Cordes
- 328,167
- 45
- 605
- 847
-
so can I assign any values to be encoded in those fields given that they fit the upper bound of each field? – Arnab Das Oct 02 '19 at 14:43