Abstract
- Opcode is always 000000
- Operation is decided by the Function Code
- 6 parts - Opcode, Source Register, Target Register, Destination Register, Shift Amount & Function Code
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
$s0
by 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
Function Code
- 6 bits
- Give MIPS (2^6-1) + 2^6 = 127 instead of 2^6=64 Instruction
- Dedicated for MIPS R-Type Instruction (if my understanding isn’t wrong)
Shift Amount
- 5bits
- Labeled as
shamt