We normally work with numbers in base 10. In this section we consider numbers in base 2, often called binary numbers.
In base 10 we use the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
In base 2 we use only the digits 0 and 1.
Binary numbers are at the heart of all computing systems since, in an electrical circuit, 0 represents no current flowing whereas 1 represents a current flowing.
In base 10 we use a system of place values as shown below:
| 1000 | 100 | 10 | 1 | ||
| 4 | 2 | 1 | 5 | → | 4 × 1000 + 2 × 100 + 1 × 10 + 5 × 1 |
| 3 | 1 | 0 | 2 | → | 3 × 1000 + 1 × 100 + 2 × 1 |
Note that, to obtain the place value for the next digit to the left, we multiply by 10. If we were to add another digit to the front (left) of the numbers above, that number would represent 10 000s.
In base 2 we use a system of place values as shown below:
| 64 | 32 | 16 | 8 | 4 | 2 | 1 | ||
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | → | 1 × 64 = 64 |
| 1 | 0 | 0 | 1 | 0 | 0 | 1 | → | 1 × 64 + 1 × 8 + 1 × 1 = 73 |
Note that the place values begin with 1 and are multiplied by 2 as you move to the left.
Once you know how the place value system works, you can convert binary numbers to base 10, and vice versa.
Worked Examples
Convert the following binary numbers to base 10:
For each number, consider the place value of every digit.
| 4 | 2 | 1 | ||
| 1 | 1 | 1 | → | 4 + 2 + 1 = 7 |
The binary number 111 is 7 in base 10.
| 4 | 2 | 1 | ||
| 1 | 0 | 1 | → | 4 + 1 = 5 |
The binary number 101 is 5 in base 10.
| 64 | 32 | 16 | 8 | 4 | 2 | 1 | ||
| 1 | 1 | 0 | 0 | 1 | 1 | 0 | → | 64 + 32 + 4 + 2 = 102 |
The binary number 1100110 is 102 in base 10.
Convert the following base 10 numbers into binary numbers:
We need to write these numbers in terms of the binary place value headings
| 2 | 1 | ||
| 3 = 2 + 1 | → | 1 | 1 |
The base 10 number 3 is written as 11 in base 2.
| 8 | 4 | 2 | 1 | ||
| 11 = 8 + 2 + 1 | → | 1 | 0 | 1 | 1 |
The base 10 number 11 is written as 1011 in base 2.
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | ||
| 140 = 128 + 8 + 4 | → | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 |
The base 10 number 140 is written as 10001100 in base 2.
