Question

7. Solve the following using 2’s Complement. You are working with a 6-bit register (including sign)....

7. Solve the following using 2’s Complement. You are working with a 6-bit register (including sign). Indicate if there’s an overflow or not. a. (-14)+(-28) b. 12+(-16) c. 10+11

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

The overflow flag is relevant when we are calculating the sum of two signed numbers but it is not relevant to the unsigned number addition.

a.

The given expression is:

= (-14) + (-28)

The binary equivalent of 14 is = 001110

The binary equivalent of -14 is = 110000

The binary equivalent of 28 is = 011100

The binary equivalent of -28 is = 100010

110000 100010 + 010010

There is an overflow.

b.

The given expression is:

= 12 + (-16)

When the sign of two additional operands is different then overflow never occurs.

The binary equivalent of 12 is = 001100

The binary equivalent of 16 is = 010000

The binary equivalent of -16 is = 110000

001100 110000 十 111100

The MSB(Most Significant Bit) is one, so the result is negative and stored in two's complement form.

The result after two's complement is = 000100

So, the result is = -4

There is no overflow.

c.

The given expression is:

= 10 + 11

The binary equivalent of 10 is = 001010

The binary equivalent of 11 is = 001011

001010 001011 + 010101

There is no overflow.

The final result is positive and the result is = 21.

Add a comment
Know the answer?
Add Answer to:
7. Solve the following using 2’s Complement. You are working with a 6-bit register (including sign)....
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