Binary number. In mathematics and digital electronics, a binary number is a number expressed in the base-2 numeral system or binary numeral system, which uses only two symbols: typically “0” (zero) and “1” (one). The base-2 numeral system is a positional notation with a radix of 2. Each digit is referred to as a bit. Wikipedia
Table 1 below shows the structure of a 10-bit number
29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1023 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
512 | 256 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
A worked example – Decimal to Binary conversion. Here we work through the calculation of a 10-bit binary number.
223 - 512 = No => 0 223 - 256 = No => 0 223 - 128 = 95 => 1 95 - 64 = 31 => 1 31 - 32 = No => 0 31 - 16 = 15 => 1 15 - 8 = 7 => 1 7 - 4 = 3 => 1 3 - 2 = 1 => 1
A worked example – Binary to Decimal conversion. Here we work through the calculation to a decimal number.
= 0.512 + 0.256 + 1.128 + 1.64 + 0.32 + 1.16 + 1.8 + 1.4 + 1.2 + 1.1 = 223