Question

Please answer all the questions! Thank you.For the following C statement, what would be the corresponding MIPS assembly code? Assume that the variables a, b, c, and d a

0 0
Add a comment Improve this question Transcribed image text
Answer #1

We are allowed to answer 4 sub parts only. So, I answered 3a, 3b, 4a and 4b. Please post accordingly.

Base-16 to base-2
Take each one in base-16 and change it to equivalent 4 bit in base-2

Hex values
A - 1010
B - 1011
C - 1100
D - 1101
E - 1110
F - 1111

3.a) ABCD = 1010 1011 1100 1101
3.b) 1DEF = 0001 1101 1110 1111

Base-10 to unsigned base-2

4.a)

35 217 - remainder -> 1 17 / 2 8-> remainder-> 1 824 -remainder -0 412 2 -remainder-0 22 1-remainder-0 1 2 0-remainder - 1 ผr

4.b)

157 / 2 = 78-> remainder-> 1 78 / 2 = 39-> remainder-> 0 39 / 2 19-> remainder-> 1 19 / 2-9-> remainder-> 1 9 / 2 4-> remaind

--------------------------------------
We are allowed to answer 4 sub parts only. So, I answered 3a, 3b, 4a and 4b. Please post accordingly.

Add a comment
Know the answer?
Add Answer to:
Please answer all the questions! Thank you. For the following C statement, what would be the corresponding MIPS assembly...
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