Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TRANSLATING AN ASSEMBLY CODE TO BINARY FOR R FORMAT
- |OP|RS|RT|RD|SHAMT|FUNCT|
- Op code 6 bits
- First source code 5 bits
- Second source code 5 bits
- Destination code 5 bits
- Shift amount 6 bits
- Function code extends OP code 6 bits
- OP RS blank RT=$t0 RD
- OP DEST RS RT SHAMT Funct
- ADD $T0(RDest),$$(RSource 1),$$(RT source 2) adds $$ and $$ to $T0 |shiftamt 0| Funct = 32|
- 0 0-31 (17) 0-31 (18) 0-31(8) | 0 | 32
- OPcode000000 17unsigned 10001| 18unsigned 10010| 8uns 01000| 00000SHIFTAMT| 100000FUNCT
- OP RS RT RD SHAMT FUNCT
- 0x0 | 2| 3| 4| 0| 2| 0|
- I FORMAT
- |OP|RS|RT|CONSTANT/ADDRESS|
- Immediate arithmetic and load/store
- RT dest
- Constant -2^15-2^15-1
- OP RT RS|ADDRESS
- LW $t1 8($S0)
- Removes from third spot in the array. And places in to $T1 register
- OP| RS| RT| Address/integer/constant|
- 6BIT5BIT5BIT 16BIT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement