Question

COMPUTER ARCHITECTURE QUESTION: In the following two cases, find out whether there will be an overflow...

COMPUTER ARCHITECTURE QUESTION:

In the following two cases, find out whether there will be an overflow exception after the instruction
add $t0, $t1, $t2
Explain why.
   1) The numbers in $t1 and $t2 are 0xA0000004 and 0xA0000002, respectively.
   2) The numbers in $t1 and $t2 are 0xA0000002 and 0x7FFFFFF2, respectively.

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

1)

0xA0000004 = 1010 0000 0000 0000 0000 0000 0000 01002 is a negative

0xA0000002 = 1010 0000 0000 0000 0000 0000 0000 00102 is a also negative.

So, From the maths rule, After adding negative number with a negative number results in a positive number. So there is overflow

2)

0x7FFFFFF2 = 0111 1111 1111 1111 1111 1111 1111 00102 is a positive integer,

0xA0000002 = 1010 0000 0000 0000 0000 0000 0000 00102 is a negative integer.

A positive number adding a negative number never leads to overflow. So there is no overflow.

Add a comment
Know the answer?
Add Answer to:
COMPUTER ARCHITECTURE QUESTION: In the following two cases, find out whether there will be an overflow...
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