2.3 Signed of Binary number
Binary number can assign to Positive and Negative value by assignment at MSB
bit. If MSB is "0", that binary number is positive. In the other hand, if MSB is "1" that binary
number is negative.
These informations below present the unsigned and signed binary number
compare with decimal number to make the understanding clearly.
Binary Decimal
Signed number Unsigned number
0000 0 0
0001 1 1
0010 2 2
0011 3 3
0100 4 4
0101 5 5
0110 6 6
0111 7 7
1000 - 8 8
1001 - 7 9
1010 - 6 10
1011 - 5 11
1100 - 4 12
1101 - 3 13
1110 - 2 14
1111 - 1 15
In signed binary number to decimal conversion can use similar technique.
For examaple, 1000 binary number the MSB is "1". The digit weight is 23 or 8. This
signed binary number is equal -8. In conversion the remain 3 bit is positive value. Thus,
the conversion is -8 + 0 = -8.
Next example, convert 1101 signed number to decimal. At MSB is -8 and 3 last right
bit is positive as +5 [101 = (22
x 0) + (21 x 0) + (20
x 1)]. The conversion is -8 + 5 = -3