Discover how computers represent numbers using only 0 and 1, then test your skills with interactive binary challenges.
Computers do not normally represent numbers using the ten symbols we use in everyday decimal notation. At the lowest level, digital systems work with two states, commonly represented as 0 and 1. This two-symbol system is called binary.
Binary is a base-2 number system. Decimal is base 10 and uses the digits 0–9. Binary uses only 0 and 1. Each binary position has a value that is a power of two.
The eight positions in an 8-bit number represent 128, 64, 32, 16, 8, 4, 2, 1.
So 00000101 means 4 + 1 = 5.
Starting from the right, binary place values double each time you move one position to the left.
Tap the eight bit buttons below to switch them between 0 and 1. The activity calculates the decimal value for you. Try to build different numbers and notice how each position contributes to the total.
Binary is useful because electronic and digital systems can distinguish between two states. A bit is a binary digit and can have a value of 0 or 1. Eight bits make one byte.
A photograph, document, song or program may look very different to us, but digital devices store and process information as patterns of bits. More bits allow a system to represent more possible combinations.
To convert a decimal number to binary, identify which powers of two add up to that number. For example, 13 = 8 + 4 + 1, so the 8-bit representation is 00001101.
| Place value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|---|
| 13 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 |
Test your understanding. Choose one answer for each question. You will receive feedback and a final score.