Decimal to Binary Converter

Convert any decimal number to binary with step-by-step division method

0 digits

Try an example:

Enter a decimal number and click convert to see the division method step by step.

Tip: The division method works by repeatedly dividing by 2 and reading the remainders from bottom to top. The last remainder is the most significant bit.

How to Convert Decimal to Binary

Converting decimal to binary using the division-by-2 method is the standard approach taught in every computer science program. The idea is simple: keep dividing the decimal number by 2, writing down the remainder at each step, until you reach 0. Then read the remainders from bottom to top — that's your binary number.

Take 42 as an example. 42 / 2 = 21 remainder 0. 21 / 2 = 10 remainder 1. 10 / 2 = 5 remainder 0. 5 / 2 = 2 remainder 1. 2 / 2 = 1 remainder 0. 1 / 2 = 0 remainder 1. Reading the remainders upward: 101010. That's 42 in binary. I've done this exact conversion so many times that I can now recognize 101010 as 42 on sight — it's one of those numbers that shows up a lot in demo code and tutorials, probably because "The Answer to the Ultimate Question of Life, the Universe, and Everything" makes it memorable.

Step-by-Step Division Method

  1. Divide by 2 — Divide the decimal number by 2. Write down the quotient and the remainder.
  2. Repeat — Continue dividing the quotient by 2 until the quotient reaches 0.
  3. Read upward — Read the remainders from the last division to the first (bottom to top). This sequence is the binary representation.

For example, 13: 13 / 2 = 6 r1, 6 / 2 = 3 r0, 3 / 2 = 1 r1, 1 / 2 = 0 r1 → Read upward: 1101.

Common Decimal to Binary Values

  • 0 = 0
  • 1 = 1
  • 2 = 10
  • 8 = 1000
  • 16 = 10000
  • 128 = 10000000
  • 255 = 11111111 — Maximum 8-bit number.
  • 1024 = 10000000000 — 1 kilobyte in binary.

Why Decimal to Binary Conversion Still Matters

You might think that in 2026 nobody needs to manually convert decimal to binary anymore. And sure, high-level programming languages handle all of this for you. But there's a difference between not needing to do something and understanding how it works. When you understand binary representation, concepts like two's complement for negative numbers, bitwise operations, and integer overflow become intuitive rather than mysterious.

I once spent three hours debugging a hard-to-find bug in an embedded system because a sensor returned a status byte and I was interpreting the bits wrong. The documentation said "bit 7 indicates error" — but I was reading it as the leftmost bit of a 4-bit field when it was actually the MSB of the full byte. The moment I sat down and manually converted the decimal sensor reading to binary, the mistake was obvious. A good decimal to binary converter would have caught it in seconds. That's why I built this — sometimes seeing the raw bits is the fastest debugger there is.

Related Tools

Binary to Decimal → Binary to Hex → Hex to Binary → Binary to Octal → Octal to Binary → Binary Translator Home →