Integer Representation: Two's Complement, Overflow, Endianness and the Lost long ID in JSON
Computers store negative integers in two's complement: invert the bits and add 1, so a single adder both adds and subtracts and there is only one zero. The int.MinValue asymmetry and the Math.Abs exception, wrap-around, widths from byte to Int128, endianness and BinaryPrimitives, a long ID above 2^53 silently changing in JSON, Y2038 and an exhausted int identity.
14 Nov 2026
·
12 min
·
6