<<< Overflow Condition | Index | Adding Unsigned Numbers >>> |
Computers don't know the difference between signed and unsigned binary numbers.
This is a good thing, because it makes logic circuits fast.
This is also a bad thing, because distinguishing between signed and unsigned is our responsibility.
The distinction is very important when detecting an overflow after addition or subtraction.
Correct approach to detect the overflow is to consider two separate cases:
Overflow when adding unsigned numbers.
Overflow when adding signed numbers.
<<< Overflow Condition | Index | Adding Unsigned Numbers >>> |