Question

if we subtract 1000 from 0001 is there overflow? (binary)

if we subtract 1000 from 0001 is there overflow? (binary)

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

2's Complement subtraction:

Overflow occurs in 2's complement if and only if result and subtrahend and result has same sign.

  • (+X) - ( -Y) = -Z (result Z and subtrahend Y has same sign -)

  • (-X) - (+Y) = + Z (result Z and subtrahend Y has same sign +)

Given,

X = 0001 (0 in MSB indicates positive number and it's value is +1 in decimal)

Y = 1000 (1 in MSB indicates negative number and it's value is -8 in decimal)

Then,

(+X) - (-Y) = X + Y

Overflow occurs if  result (MSB) and Y has same sign.

MSB of result is 1 which indicates negative number and subtrahend Y has also has the same sign. So therefore there is an overflow.

OR

Since MSB = 1 and carryout = 0 there is an overflow.

Therefore, there is an overflow if we subtract 1000 from 0001.

Add a comment
Know the answer?
Add Answer to:
if we subtract 1000 from 0001 is there overflow? (binary)
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