Base Converter guide
How to Convert Decimal to Binary
To convert decimal to binary, divide the number by 2 repeatedly, writing down the remainder each time, until the quotient reaches 0. Then read the remainders from the bottom up. For 214 this gives 11010110.
Method 1 — repeated division
This is the method most courses teach, and it always works.
Divide your number by 2. Write down the whole-number answer and the remainder — the remainder will always be 0 or 1. Then divide that answer by 2 again, and keep going until you reach 0.
Then read the remainders from the bottom up. Reading them top-down is the single most common error here, and it gives you the number backwards.
Working through 214
| Divide | Result | Remainder |
|---|---|---|
| 214 ÷ 2 | 107 | 0 |
| 107 ÷ 2 | 53 | 1 |
| 53 ÷ 2 | 26 | 1 |
| 26 ÷ 2 | 13 | 0 |
| 13 ÷ 2 | 6 | 1 |
| 6 ÷ 2 | 3 | 0 |
| 3 ÷ 2 | 1 | 1 |
| 1 ÷ 2 | 0 | 1 |
Reading the answer
Reading the remainder column from the bottom to the top: 11010110.
That matches the binary-to-decimal guide, where 11010110 came out as 214. Converting back and forth is the best check there is — if you land where you started, both conversions were right.
Method 2 — subtract the place values
Many people find this one more intuitive, and it is usually quicker in your head.
Write out the powers of two up to your number: 1, 2, 4, 8, 16, 32, 64, 128. Find the largest one that fits inside your number, put a 1 there, and subtract it. Repeat with what is left.
For 214: 128 fits, leaving 86. 64 fits, leaving 22. 32 does not fit, so 0. 16 fits, leaving 6. 8 does not fit, so 0. 4 fits, leaving 2. 2 fits, leaving 0. 1 does not fit, so 0.
Reading the 1s and 0s in order: 11010110. Same answer.
The thing to be careful about is remembering to write a 0 for every place value that did not fit. Skipping them silently shortens your number and shifts everything.
Which method to use
Repeated division is more mechanical, which makes it more reliable when you are tired or the number is large. It also generalises — the same procedure converts to any base, just dividing by that base instead of by 2.
Subtracting place values is faster for small numbers and builds a better feel for what binary actually means. If you are converting something under 256, it is usually quicker.
It is worth being able to do both, if only so you can check one against the other.