R-Type Instruction
The R-type (register) format (opcode 011 0011) is designed for instructions that involve 3 registers and no immediate, such as arithmetic, bitwise, shifting, and conditional setting instructions. It follows the format:
| 31-25 | 24-20 | 19-15 | 14-12 | 11-7 | 6-0 |
|---|---|---|---|---|---|
| funct7 | rs2 | rs1 | funct3 | rd | opcode |
where
rs1andrs2are the 5-bit source registers, andrdis the 5-bit destination register.