Re:Signed Integers Are Two’s Complement
by sanxiyn on Thursday May 31, 2018 @06:24AM
(#17195247)
The point is that signed integers are two's complement. After all, it is the title.
[ Parent
| on HN ]
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.