Question

For the MIPS instruction sw $s3,18820($t5), show the immediate number, opcode, rs, and rt in binary...

For the MIPS instruction sw $s3,18820($t5), show the immediate number, opcode, rs, and rt in binary in the given order, separated by comma.

Homework Answers

Answer #1

0100100110000100,101011,01101,10011

Explanation:
-------------
sw $s3,18820($t5)
immediate number:   18820
Divide 18820 successively by 2 until the quotient is 0
   > 18820/2 = 9410, remainder is 0
   > 9410/2 = 4705, remainder is 0
   > 4705/2 = 2352, remainder is 1
   > 2352/2 = 1176, remainder is 0
   > 1176/2 = 588, remainder is 0
   > 588/2 = 294, remainder is 0
   > 294/2 = 147, remainder is 0
   > 147/2 = 73, remainder is 1
   > 73/2 = 36, remainder is 1
   > 36/2 = 18, remainder is 0
   > 18/2 = 9, remainder is 0
   > 9/2 = 4, remainder is 1
   > 4/2 = 2, remainder is 0
   > 2/2 = 1, remainder is 0
   > 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 100100110000100
So, 18820 of decimal is 100100110000100 in binary
0100100110000100

opcode: sw (101011)
rs:     $t5 (01101)
rt:     $s3 (10011)
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions