Описание тега twos-complement
Two's complement is a mathematical operation on binary numbers, as well as a binary signed number representation based on this operation.
A two's complement binary number follows the same principal as a pure binary number, except for the first bit: the most significant bit. If this bit is 0, the binary number is positive, if it's 1 then the number will be negative.
For example:
01110 = 8 + 4 + 2
= 14
10010 = -16 + 2
= -14
So 01110
is 14 in denary and 10010
is -14 in denary