Abstract
+--------+------+------+------+------+------+
| Opcode | Rs | Rt | Rd | Shamt| Funct|
| 6 bits |5 bits|5 bits|5 bits|5 bits|6 bits|
+--------+------+------+------+------+------+
- Opcode is always
000000 functcombined with opcode exactly specifies the instructionrsspecifies register containing first operandrtspecifies register containing second operand. Set to0for shift instructionsrdspecifies register which will receive result of computationshamtforsllandsrl. Set to0for non-shift instructions
2 types of instructions
arith $rd, $rs, $rtshift $rd, $rt, shamt
Important
R format instructions has only registers as Instruction Operand except the shift instructions.
Function Code
- 6 bits
- Give MIPS (2^6-1) + 2^6 = 127 instead of 2^6=64 Instruction
- Dedicated for MIPS R-Type Instruction
Examples
srl
- Shift Right Logical
- Source Register is 0
- Shifts the value right by n bits, discarding the lower n bits
- Dividing the value in register
$s0by 16 (2^4) -srl $s0, $s0, 4
Terminologies
Destination Register
- 5bits
- Labeled
rd, mapped toWR - Register that gets the result of Operation in MIPS R-Type Instruction Instruction
