Computers only understand two digits: 0 and 1. In this lesson you will learn how place values work in binary, and how to convert numbers between decimal and binary — step by step, in simple English.
01 — Try It Yourself
Click the boxes below to turn bits ON (1) or OFF (0). Watch how the decimal value changes. This is exactly how an 8-bit binary number works.
02 — The Basic Idea
Binary is a number system that uses only two digits: 0 and 1. This is called "base-2". Our everyday number system (0–9) is "base-10". Computers use binary because electronic switches only have two states: off (0) and on (1).
In decimal, each place value is 10 times bigger than the one to its right (1, 10, 100, 1000...). In binary, each place value is only 2 times bigger than the one to its right. Here are the place values for an 8-bit binary number:
Notice the pattern: 1, 2, 4, 8, 16, 32, 64, 128 — each number is double the one before it. That pattern is the key to everything in this lesson.
03 — Method 1
To convert a decimal number into binary, keep dividing it by 2 and write down the remainder each time. Stop when the number reaches 0. Then read the remainders from bottom to top.
Worked Example: Convert 13 to binary
| Number | ÷ 2 | Quotient | Remainder |
|---|---|---|---|
| 13 | 13 ÷ 2 | 6 | 1 |
| 6 | 6 ÷ 2 | 3 | 0 |
| 3 | 3 ÷ 2 | 1 | 1 |
| 1 | 1 ÷ 2 | 0 | 1 |
Now try it yourself:
04 — Method 2
To convert binary into decimal, multiply each bit by its place value, then add up all the results.
Worked Example: Convert 10110 to decimal
| Bit | 1 | 0 | 1 | 1 | 0 |
|---|---|---|---|---|---|
| Place Value | 16 | 8 | 4 | 2 | 1 |
| Bit × Place | 16 | 0 | 4 | 2 | 0 |
Now try it yourself:
05 — Simple Quiz
Answer all 10 questions, then click Check Answers to see your score and explanations.