Question

Question 3 (10 points) Convert the following MIPS assembly code into machine language. Write the instruction in hexadecimal. The opcode for sw 43 (101011). sw St1, -4(St3) Question 4 (10 points) Consider the following MIPS assembly code: addi $s3, $0, 5 addi $s1, S0, 3 addi Ss1, $s1, 2 beq Ss3, Ssl, target addi Ss1, Ss1, 1 target: add Ss3, Ss1, Ssl a. After running the code, what is the value of Ss3? b. If the memory address of the first instruction (addi $s3, S0, 5) is 0x00400000, what is the address of the third instruction in the code (addi Ssl, Ss1, 2
0 0
Add a comment Improve this question Transcribed image text
Answer #1

sw $t, offset($s)

1010 11ss ssst tttt iiii iiii iiii iiii

our instruction:
sw $t1, -4($t3)


$t is $t1 which is 9 (ttttt is 01001)
$s is $t3 which is 11(sssss is 01011)
4 in binary is 0000 0000 0000 0100
-4 in binary is 1111 1111 1111 1100 which is FFFC


sw $t1, -4($t3) is
1010 1101 0110 1001 1111 1111 1111 1100 => 0xAD69FFFC

as per the quidelines we are only allowed to solve first question

please make a di f ferent post for other question

Add a comment
Know the answer?
Add Answer to:
Question 3 (10 points) Convert the following MIPS assembly code into machine language. Write the instruction...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT