2’s Complement of a Binary Number in C
The 2’s complement of a binary number in C is the way modern computers represent negative integers. In an 8-bit system, +5 is stored as 00000101 and −5 is stored as 11111011 (the 2’s complement of 00000101). Using 2’s complement, subtraction becomes ordinary addition and there is only one representation of zero — which is …