Two 8-bit two’s complement numbers 01100100 (+100) and 01010000 (+80) are added. What is the result?

Correct answer C. 10110100, which reads as -76, so overflow has occurred

Explanation

The true sum 180 exceeds +127, the largest 8-bit two's complement value. The bit pattern 10110100 has its sign bit set, so it reads as -76. Adding two positive numbers and getting a negative result is the classic sign of signed overflow. Reading it as +180 is only valid for unsigned interpretation, which is not what two's complement arithmetic produces.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.