Delete comment from: Ken Shirriff's blog
Overflow flag can be omited if never pass to CPU wrong integers.
But I can show you example, there one's complement subtraction doesn't work. Say need to subtract 4 from 8, that is 8-4 = 4. Then (9th bit from left is carry, which for 8 bits numbers is 0):
00001000 - 00000100 = 00001000 + 11111011 = 100000011 (most left bit "1" is carry). And 00000011 is 3. Then we add carry to 00000011 and get 00000100, which is 4.
Mar 6, 2025, 5:06:10 PM

