|
MIPS Instruction Format
(from David Patterson's Lecture Slides)
- All MIPS instructions are encoded in binary.
- All MIPS instructions are 32 bits long.
- (Note: some assembly langs do not have uniform length for all
instructions)
All instructions have:
- op: code for operation (6 bits)
Most instructions also have: (R-format)
- rs: 1st operand (register source) (5 bits)
rt: 2nd operand (5 bits)
rd: register destination (5 bits)
shamt: shift amount (0 when N/A) (5 bits)
funct: function (variant of operation in op: op+funct specifies
operation) (6 bits)
Next
|