A type of
MIPS instruction used mostly for
arithmetic and logic functions.
The first 6 bits (bits 31-26) as in all MIPS instructions are the opcode.
The next 5 (25-21) after that represent the first source register. (MIPS processors have 32 general purpose registers) The following 5 (20-16) are for the next source register, and the next 5 (15-11) after that designate the destination register of the instruction.
The next 5 bits (10-6) are the
shamt
field, which is used to shift the result up to 32 bits. The last 6 (5-0) are the
funct
field, used to expand perform most arithmetic and logic operations with a single opcode. For example, the
or and
and instructions have the same opcode, but different values in the funct field.