0
$\begingroup$

I'm currently taking a number systems course and my professor has given us some practice problems for an upcoming exam. I am confused by this particular problem below:

The problem asks whether adding the two 8 bit binary numbers results in an overflow. The problem also asks if there would be an overflow if the numbers are signed, or two's complement numbers.

I understand that parts a and b would both overflow when the numbers are unsigned because the result has an extra bit. On the other hand, I'm stumped on how to check if there is an overflow with signed and two's complement numbers.

I do know that when adding 2 two's complement numbers, the carryout is discarded, but does this mean an overflow has occurred?

Thanks in advance.

$\endgroup$
0
$\begingroup$

Hint: Addition of signed integers overflows if and only if the summands have the same sign and the sum has the opposite sign.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.