Recent content by basketball853

  1. B

    Set bits 18, 19, 20, 21 to 1 ( Mips)

    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...
  2. B

    Set bits 18, 19, 20, 21 to 1 ( Mips)

    hmmm okay... ill try to figure it out
  3. B

    Set bits 18, 19, 20, 21 to 1 ( Mips)

    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
  4. B

    Set bits 18, 19, 20, 21 to 1 ( Mips)

    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?
  5. B

    Set bits 18, 19, 20, 21 to 1 ( Mips)

    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!
  6. B

    Set bits 18, 19, 20, 21 to 1 ( Mips)

    how could i implement that though? good suggestion ... like an ex..
  7. B

    Set bits 18, 19, 20, 21 to 1 ( Mips)

    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...
  8. B

    How to Translate Machine Code Instructions to MIPS Assembly?

    Also along with the second one, i figured it would be: or $a0, $at, $v0 Thank you for everything so far!
  9. B

    How to Translate Machine Code Instructions to MIPS Assembly?

    okay cool, so i have: OP = sll $t2 = ttttt $t1 = dddd $t2 = h sll $t1, $zero, $t2 would that be correct?
  10. B

    How to Translate Machine Code Instructions to MIPS Assembly?

    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?
  11. B

    How to Translate Machine Code Instructions to MIPS Assembly?

    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...
  12. B

    Converting MIPS Instructions to Binary for Computer Assembly Students

    Thank you so much for your help! You have really helped me understand this! I am very grateful!
  13. B

    Converting MIPS Instructions to Binary for Computer Assembly Students

    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) ?
  14. B

    Converting MIPS Instructions to Binary for Computer Assembly Students

    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?
  15. B

    Converting MIPS Instructions to Binary for Computer Assembly Students

    Yes i am addi $sp, $sp, -8 would that in the end turn to be (opcode) 001000 (default 0 for $sp) 00000 (default 0 for $sp) 00000 1111111111110111 (-8)
Back
Top