- Foundation
- About 12 min
- 5 practice questions
Why computers use binary: place value and bases
Explain positional number systems and why computers use base 2.
If something looks wrong, please tell us.
We count in tens because we have ten fingers. A computer is built from switches that are either off or on, so it counts in twos. Understanding place value in any base unlocks every conversion in this course.
Positional number systems
In a positional system, the value of a digit depends on its position. In decimal (base 10) the number 352 means 3 x 100 + 5 x 10 + 2 x 1. The base (or radix) is the count of different digits used.
| System | Base | Digits used |
|---|---|---|
| Decimal | 10 | 0 to 9 |
| Binary | 2 | 0, 1 |
| Octal | 8 | 0 to 7 |
| Hexadecimal | 16 | 0 to 9 and A to F (A=10, B=11, C=12, D=13, E=14, F=15) |
Why binary
Electronic circuits are reliable at telling two states apart: no signal (0) and signal (1). Using only two states makes machines simpler, cheaper and less error-prone. Octal and hexadecimal are used as shorthand because they pack many binary digits into one symbol.
Powers of two to remember
| Power | 2^0 | 2^1 | 2^2 | 2^3 | 2^4 | 2^5 | 2^6 | 2^7 | 2^8 |
|---|---|---|---|---|---|---|---|---|---|
| Value | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 256 |
Worked examples
Example 1. Expand 4075 in decimal place values. 4 x 1000 + 0 x 100 + 7 x 10 + 5 x 1 = 4075.
Example 2. How many different digits does base 5 use? Five: 0, 1, 2, 3 and 4.
Example 3. What is the largest digit in octal? 7, because the digits run from 0 up to base minus 1.
A base-b system uses digits 0 to b-1; each place is b times the place to its right.
Key takeaways
- Value of a digit depends on its place and the base.
- Binary has 2 digits, octal 8, decimal 10, hexadecimal 16.
- Learn powers of 2 up to 256.
Check your understanding
-
1. How many different digits does a base-6 number system use?
- 6
- 5
- 7
- 10
Show answer
Answer: A. A base-b system uses the digits 0 to b - 1, so base 6 uses 0, 1, 2, 3, 4 and 5: six digits.
-
2. In the decimal number 352, what is the place value of the digit 5?
- 5
- 50
- 500
- 15
Show answer
Answer: B. 352 = 3 x 100 + 5 x 10 + 2 x 1, so the 5 is worth 5 x 10 = 50.
-
3. Which of these is NOT a valid octal number?
- 175
- 760
- 182
- 1234
Show answer
Answer: C. Octal digits run from 0 to 7. 182 contains the digit 8, so it is not octal.
-
4. What is 2^7?
- 64
- 256
- 14
- 128
Show answer
Answer: D. 2^7 = 2 x 2 x 2 x 2 x 2 x 2 x 2 = 128.
-
5. Why do computers work in binary?
- Their circuits reliably tell apart two states, off (0) and on (1)
- Binary numbers are shorter than decimal numbers
- People naturally count in twos
- Binary uses more digits than decimal
Show answer
Answer: A. Electronic switches are either off or on, so two digits make machines simpler and more reliable. Binary numbers are actually longer than decimal ones.
Sign in to keep track of the lessons you finish.