Binary Number 0 and 1 |
| Used to describe a number system, or a number belonging to it, that has 2 rather than 10 as its base For instance, in a system called binary-coded decimal, each of the decimal digits 0 to 15 is coded in 4 bits. |
| Decimal | ||||||
| Base 10 | 25 | 24 | 23 | 22 | 21 | 20 |
| 0 | 0 | 0 | 0 | 0 | ||
| 1 | 0 | 0 | 0 | 1 | ||
| 2 | 0 | 0 | 1 | 0 | ||
| 3 | 0 | 0 | 1 | 1 | ||
| 4 | 0 | 1 | 0 | 0 | ||
| 5 | 0 | 1 | 0 | 1 | ||
| 6 | 0 | 1 | 1 | 0 | ||
| 7 | 0 | 1 | 1 | 1 | ||
| 8 | 1 | 0 | 0 | 0 | ||
| 9 | 1 | 0 | 0 | 1 | ||
| 10 | 1 | 0 | 1 | 0 | ||
| 11 | 1 | 0 | 1 | 1 | ||
| 12 | 1 | 1 | 0 | 0 | ||
| 13 | 1 | 1 | 0 | 1 | ||
| 14 | 1 | 1 | 1 | 0 | ||
| 15 | 1 | 1 | 1 | 1 |
| Base 10 | Base 2 (binary) | How to calculate | Base 10 |
| 0 | 0000 | 0x23+0x22+0x21+0x20 | 0+0+0+0 |
| 1 | 0001 | 0x23+0x22+0x21+1x20 | 0+0+0+1 |
| 2 | 0010 | 0x23+0x22+1x21+0x20 | 0+0+2+0 |
| ...... | |||
| 15 | 1111 | 1x23+1x22+1x21+1x20 | 8+4+2+1 |