Hacker News new | ask | show | jobs
by eru 29 days ago
For unsigned ints, or also for signed ints?
2 comments

Two's complement is a representation specifically for signed integers.
For signed. Unsigned overflow was defined for a while now.
And unsigned negation is two's complement negation as well (-u = 0-u).