- #1
basketball853
- 18
- 0
Homework Statement
Set bits 18, 19, 20, and 21 to 1 in register $v0. $v0's other bits should not change. This can be done in two MIPS instructions. Do not use any pseudo-instructions or load any data from memory. You may use any registers that you wish.
Homework Equations
Here is more on the idea: if $v0 did look like this:0b0000 0000 0000 0000 0000 0000 0000 0000 = 0x00000000
then afterwards, it should look like (counting from bit 0):
0b0000 0000 0011 1100 0000 0000 0000 0000 = 0x003C0000
Basically, just notice that bits 18 through 21 have been turned "on."
The Attempt at a Solution
I am having trouble even coming to a possible solution in 2 steps... i know that the target is register $v0 and i have to turn 18, 19, 20, 21 into 1111 ( or F in hex) but i do not know where to start... Also i know that i maybe able to use the slt opcode ? which is set if less than to 1
any thoughts ?