Y
Hacker News
new
|
ask
|
show
|
jobs
by
dmitrygr
29 days ago
Fun story: even the latest C spec doesn’t require CHAR_BIT == 8, but it does now codify 2s complement int representation. (IIRC)
1 comments
eru
29 days ago
For unsigned ints, or also for signed ints?
link
account42
29 days ago
Two's complement is a representation specifically for signed integers.
link
dmitrygr
29 days ago
For signed. Unsigned overflow was defined for a while now.
link
gblargg
29 days ago
And unsigned negation is two's complement negation as well (-u = 0-u).
link