How to Convert Decimal to Binary with Repeated Division

To convert a decimal number to binary, divide it by 2 and write down the remainder (0 or 1). Divide the quotient by 2 and record that remainder too. Repeat until the quotient hits 0, then read the remainders from bottom to top. Converting 13 this way gives 1101.

The bottom-to-top part trips everyone up at least once, so let’s walk it slowly.

The repeated division method, step by step

  1. Divide your number by 2. Write the whole-number quotient and the remainder (always 0 or 1).
  2. Divide that quotient by 2. Record the new quotient and remainder.
  3. Keep going until the quotient reaches 0.
  4. Read the remainders in reverse order, last one first. That’s the binary number.

Worked example: convert 13.

  • 13 divided by 2 is 6, remainder 1
  • 6 divided by 2 is 3, remainder 0
  • 3 divided by 2 is 1, remainder 1
  • 1 divided by 2 is 0, remainder 1

The quotient hit 0, so we stop. Reading the remainders bottom to top gives 1101.

Quick verify in the other direction: that answer has 1s in the eights, fours, and ones places, and 8 + 4 + 1 is 13. It checks out. (Verifying backwards like this takes ten seconds and catches nearly every mistake; the method lives in how to convert binary to decimal.)

One more example with an even number, 20:

  • 20 divided by 2 is 10, remainder 0
  • 10 divided by 2 is 5, remainder 0
  • 5 divided by 2 is 2, remainder 1
  • 2 divided by 2 is 1, remainder 0
  • 1 divided by 2 is 0, remainder 1

Bottom to top: 10100.

Why reading upward works

The first remainder answers the smallest question: is the number odd or even? That’s exactly what the last binary digit records, the 1s place. Each division by 2 then shifts the number rightward, so the next remainder tells you about the 2s place, then the 4s place, and so on.

You collect digits from the small end to the big end. But we write numbers big end first. Hence the flip.

Once that clicks, the two classic mistakes become easy to avoid. Reading top to bottom gives you the digits mirrored (for 13 you’d write the true answer backwards, which happens to also be a valid-looking binary number, so nothing warns you). And stopping when the quotient reaches 1 instead of 0 silently drops the biggest digit; that final “1 divided by 2 is 0, remainder 1” line is a real step, not a formality.

The subtraction shortcut

Repeated division is the reliable workhorse, but there’s a second method many people find more intuitive: subtract powers of two, biggest first.

The powers of two are 1, 2, 4, 8, 16, 32, 64, 128, doubling forever. Take the largest one that fits into your number, subtract it, and repeat with the remainder until you hit zero. Every power you used gets a 1 in its place; every power you skipped gets a 0.

For 13: the largest power that fits is 8, leaving 5. Then 4 fits, leaving 1. Then 1 fits, leaving 0. You used 8, 4, and 1, skipped 2, and writing that as places gives 1101 again.

This is really the same math approached from the top instead of the bottom, and it’s great for mental conversions of small numbers. For big numbers it gets fiddly (miss one power and everything after is wrong), which is when repeated division earns its keep: each step is dead simple, and simple steps are hard to fumble.

Practice numbers and patterns worth noticing

Convert a handful yourself, then check against the decimal to binary converter. Good practice targets: your age, today’s date, 15 and then 16 (adjacent numbers, dramatically different binary), 20.

The 15-and-16 pair teaches the best pattern in binary. Fifteen is 1111, all ones. Sixteen is 10000, a one and then all zeros. Numbers one below a power of two fill every place; the power itself opens a new place and clears the rest. Decimal does the same thing at 99 to 100. Same rhythm, different base.

You’ll also notice even numbers always end in 0 and odd numbers in 1, since the last digit is the 1s place. That single fact is the fastest error-check available: if you convert 13 and your answer ends in 0, no further checking needed, it’s wrong.

Every number from 0 through 20 has its own breakdown page on this site (13 in binary covers today’s example), and the numbers in binary hub lines them all up so the doubling patterns jump out. For the theory underneath place values, see the binary number system guide.

FAQ

How do you convert decimal to binary?

Divide the number by 2 and record the remainder. Divide each new quotient by 2, recording remainders, until the quotient is 0. Then read the remainders in reverse, last first. Converting 13 produces remainders 1, 0, 1, 1, which read bottom to top as 1101.

What is 13 in binary?

13 in binary is 1101. Repeated division gives remainders 1, 0, 1, 1 reading downward, which reverse to the answer. You can confirm with place values: it has 1s in the eights, fours, and ones places, and 8 + 4 + 1 equals 13.

Why do you read the remainders backwards?

The first division extracts the smallest place value (whether the number is odd), and later divisions extract progressively larger places. Since we write numbers with the largest place first, the collection order is the reverse of the writing order. Reading top to bottom gives a mirrored, wrong answer.

When do you stop dividing?

When the quotient reaches 0, not 1. The step “1 divided by 2 is 0, remainder 1” produces the leading digit of your answer. Stopping one step early drops that digit and cuts your number roughly in half, which is the most common error in this method.

Is there a faster way than repeated division?

For small numbers, yes: subtract the largest power of two that fits, repeat until you reach zero, and put a 1 in each place you used. For 13 that’s 8, then 4, then 1. Division scales better for large numbers, and the decimal to binary tool is instant for either.