Y
Hacker News
new
|
ask
|
show
|
jobs
by
gcr
672 days ago
Subtraction of unsigned negative values still works just fine because of two’s compliment.
(uint8)(-3) is 253, for example, and (uint8)5-(uint8)253 = (uint8)8, corresponding to 5 - (-3)