There are three types of instruction format:Register Type (R-type),Immediate type(I-type) and Jump type(J-type). Of the three formats, the R-type is the most complex.
B31-26 | B25-21 | B20-16 | B15-11 | B10-6 | B5-0 |
opcode | register s | register t | register d | shift amount | function |
opcode
Opcode is short for "operation code". The opcode is a binary encoding for the instruction.
All R-type instruction use opcode 000000.
register s
Register s is source register specifier.The source register is the register that holds one of the arguments of the operation.
register t
Register t is target register specifier.It is the second source register.
register d
Register d is destination register specifier.Destination register is the register where the result of the operation is stored.
shift amount
The amount of bits to shift. Used in shift instructions.
function
An additional 6 bits used to specify the operation, in addition to the opcode.
Register addressing
Register addressing is the simplest addressing mode.
where; $t0=rd
$t1=rs
$t2=rt
thus : $t0=$t1+$t2
TONG WENG SENG
B031210084
thanks for sharing
ReplyDeletewell done
ReplyDeletebro, good job...
ReplyDeletethanks for your information.
ReplyDelete