ok so in order to acomplish this i simply wrote out 32 bits...
0000 0000 0000 0000 0000 0000 0000 0000
and do i count from right to left with 0 ? soo that being
0100 0000 0000 0000 0000 0000 0001 0000
right?
if this is the case then can't i do:
lui $t1, 0x4000
ori $t1, 0x0010
and...
Well i know that before $v0 = 0b1000 0000 0000 0000 0000 0000 0010 1111
and after $v0 = 0b0100 0000 0000 0000 0000 0000 0001 1111
so would i just lui for the 32 bits and then ori ? for the rest
Oh! and guys how could i possibly go about having that same register $v0, set bits 31 and 30 to 0 and 1 respectively. Additionally, set bits 4 and 5 to 1 and 0 respectively.
In six steps ? should i lui again to manipulate 16-31?
Thank You Guys for all of the help! i see how simple it is now... i totally forgot about lui lol it slipped right passed me, and i definitely didn't know about masking! i will read up on it more!
THANK YOU SOOOOOO SOOOOO SOOOOO SOOOO MUCH!
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 EquationsHere is more on the...
okay... so then is that a shift? I am looking at this website http://www.student.cs.uwaterloo.ca/~isg/res/mips/opcodes
of the last of the function am i just matching the last 6? which would be 000000? and the 5 before that would be the shamt (shift) amount?
Homework Statement
Hey everybody! here is my question: Translate the following machine code instructions to MIPS assembly. What is the format of each instruction?
1. 0000 0000 0000 1010 0100 1010 1000 0000
2. 0000 0000 0010 0010 0010 0000 0010 0101
Homework Equations
The Attempt at...
okay SWEET! soo and for the other one i got
101011 11111 11111 how do i figure out the 4($sp) ?
you stated before "4($sp) would be an address on the stack - $sp + 4*(size of a machine word)."
so do i take 29 + 4 * ( idk what the size of word is) ?
oohhh i think i may understand... so the value of $sp ( the stack pointer) is $29 sooo
it would be
001000 11101 11101 111111111111011
opcode $sp $sp -8 constant
did i correctly get the value?