Re:Signed Integers Are Two’s Complement
by badsectoracula on Thursday May 31, 2018 @06:04AM
(#17195180)
Gah, what is the point then?
[ Parent
| on HN ]
The point is that signed integers are two's complement. After all, it is the title.
Naive overflow checks are often done by adding two positive numbers together and checking if the result is negative. If wrapping is undefined, this no longer works, and the overflow check may be eliminated.