How to Convert Decimal to Binary (Step by Step, With Worked Examples)
Decimal is the number system you use every day: 0, 1, 2, 3, all the way up to 9, and then the digits repeat in a new place. Binary is the number system computers use: just two digits, 0 and 1. Converting a decimal number to binary sounds technical, but it only takes one simple trick — dividing by 2 and writing down the remainders.
In this guide, you will learn two easy methods, see them worked out on real numbers, and find out how to check your answers. If you already know the reverse direction, our guide on how to convert binary to decimal covers that side of the same skill.
A Quick Refresher: Why Binary Works
In decimal, each place is worth ten times the one before it: ones, tens, hundreds, and so on. In binary, each place is worth twice the one before it: ones, twos, fours, eights, sixteens, and so on.
| Binary Place | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Value | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
So the binary number 1010 means one 8 plus one 2, which equals 10 in decimal. Every binary number is just a set of "on" (1) and "off" (0) switches for these place values.
Method 1: Divide by 2 (The Remainder Method)
This is the most reliable method, and it works for any number. Just repeat these steps:
- Divide the number by 2.
- Write down the remainder (0 or 1).
- Repeat with the answer until you reach 0.
- Read the remainders from bottom to top — that is your binary number.
Example: Convert 42 to Binary
| Step | Calculation | Remainder |
| 1 | 42 ÷ 2 = 21 | 0 |
| 2 | 21 ÷ 2 = 10 | 1 |
| 3 | 10 ÷ 2 = 5 | 0 |
| 4 | 5 ÷ 2 = 2 | 1 |
| 5 | 2 ÷ 2 = 1 | 0 |
| 6 | 1 ÷ 2 = 0 | 1 |
Now read the remainders from bottom to top: 101010. So 42 in decimal is 101010 in binary.
Example: Convert 13 to Binary
| Step | Calculation | Remainder |
| 1 | 13 ÷ 2 = 6 | 1 |
| 2 | 6 ÷ 2 = 3 | 0 |
| 3 | 3 ÷ 2 = 1 | 1 |
| 4 | 1 ÷ 2 = 0 | 1 |
Reading the remainders from bottom to top gives 1101. Check it with place values: 8 + 4 + 0 + 1 = 13. Correct.
Method 2: Subtract the Largest Place Value
This method is faster for small numbers once you know the place values.
- Find the largest binary place value that fits inside your number.
- Write 1 for that place and subtract it.
- Repeat with what is left, writing 0 for any place value that does not fit.
Example: Convert 100 to Binary
- The largest place value inside 100 is 64. Write 1, and 100 − 64 = 36.
- The next place, 32, fits inside 36. Write 1, and 36 − 32 = 4.
- 16 and 8 do not fit inside 4, so write 0 for both.
- 4 fits exactly. Write 1, and the remainder is 0.
- The remaining places, 2 and 1, get 0.
Reading across the places 64, 32, 16, 8, 4, 2, 1 gives 1100100. Check: 64 + 32 + 4 = 100. Correct.
Decimal to Binary Table (0 to 17)
Keep this table handy while you practise:
| Decimal | Binary | Decimal | Binary |
| 0 | 0 | 9 | 1001 |
| 1 | 1 | 10 | 1010 |
| 2 | 10 | 11 | 1011 |
| 3 | 11 | 12 | 1100 |
| 4 | 100 | 13 | 1101 |
| 5 | 101 | 14 | 1110 |
| 6 | 110 | 15 | 1111 |
| 7 | 111 | 16 | 10000 |
| 8 | 1000 | 17 | 10001 |
Note: 7 is 111, 15 is 1111, and 255 is 11111111 — a number of all 1s is always one less than the next power of two.
More Worked Examples
Convert 7 to binary. Divide by 2 repeatedly: 7 ÷ 2 = 3 remainder 1; 3 ÷ 2 = 1 remainder 1; 1 ÷ 2 = 0 remainder 1. Read bottom to top: 111. Check: 4 + 2 + 1 = 7.
Convert 19 to binary. 19 ÷ 2 = 9 remainder 1; 9 ÷ 2 = 4 remainder 1; 4 ÷ 2 = 2 remainder 0; 2 ÷ 2 = 1 remainder 0; 1 ÷ 2 = 0 remainder 1. Read bottom to top: 10011. Check: 16 + 2 + 1 = 19.
Convert 255 to binary. Place values: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255, so every place is on: 11111111 — the largest number stored in 8 bits.
Common Mistakes to Avoid
- Reading the remainders top to bottom. This is the number one mistake. The remainders must be read from the last division back up to the first, or your answer comes out backwards.
- Stopping too early. Keep dividing until the answer is 0. If you stop at 1, you lose the final remainder and your answer is one digit short.
- Forgetting the zero places. In Method 2, every place value needs a digit, even if it is 0. Skipping a place shifts all the other digits and changes the value completely.
- Confusing 10 with ten. In binary, 10 means two, not ten. Always say "one zero" for binary numbers until the place values feel natural.
How to Check Your Answer
Add up the place values of your binary number. For 101010, the 1s sit in the 32, 8 and 2 places: 32 + 8 + 2 = 42. If the sum matches your original decimal number, your conversion is right. For a faster check, a binary translator converts numbers in both directions instantly, which is ideal when you are practising.
Frequently Asked Questions
What is the easiest way to convert decimal to binary?
For most people, the divide-by-2 method is easiest because it is the same steps every time: divide, write the remainder, repeat, then read the remainders from bottom to top. No memorising of place values is needed.
How do you convert 10 to binary?
Divide by 2: 10 ÷ 2 = 5 remainder 0; 5 ÷ 2 = 2 remainder 1; 2 ÷ 2 = 1 remainder 0; 1 ÷ 2 = 0 remainder 1. Read bottom to top: 1010. Check: 8 + 2 = 10.
Why do computers use binary?
Computers are built from tiny switches that can only be on or off, so binary matches the hardware perfectly: 1 means on, 0 means off.
Practise Makes It Automatic
Conversion feels slow the first few times, then it clicks. Start with small numbers from the table, check yourself by adding the place values back up, and move on to 42 and 100.
Try it now with a binary translator: convert your age, your house number, or the current year, and check your hand-written answer against the tool.
