Comment by dmitrygr
11 hours ago
Fun story: even the latest C spec doesn’t require CHAR_BIT == 8, but it does now codify 2s complement int representation. (IIRC)
11 hours ago
Fun story: even the latest C spec doesn’t require CHAR_BIT == 8, but it does now codify 2s complement int representation. (IIRC)
For unsigned ints, or also for signed ints?
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).