This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.First of all, as it is also explained in the book, the length of the instruction is 32 bits. Function of the instruction type, each of the fields has distinct length and role. For instance, let’s assume the instruction to be encoded is a simple addition, namely ADD $10, $11, $12. This instruction will be represented by R-Type instruction is MIPS64.
In case of R-Type instruction, opcode has 6 bits, function 6 bits, shamt 5 bits and each of rd, rs and rt has 5 bits (the length can be easily deduced from the Figure 1.6 as well). The total is 6+5+5+5+5+6=32. These instructions are useful when entire data resides in the registers.
(Opcode + function) specifies the type of operation that must be executed.
Shamt field it is used in case of shift instructions (if no shift is present, it is equal to 0).
Rd – represents the destination register.
Rs – represents the 1st operand of the instruction.
Rt – represents the 2nd operand of the instruction....