← Back to tool

Decimal · Base 10 → Base 2

Decimal to Binary Converter

Updated: June 2026

Turning an everyday decimal number into binary is the reverse of summing powers of two. The classic pencil-and-paper approach is the divide-by-2 method: it works for any size of number and never requires you to memorise powers beyond knowing that two halves make a whole.

Convert Decimal to Binary →

Free · No upload · Instant in the browser

The divide-by-2 remainder method

Repeatedly divide the number by 2. Each time, note whether the division leaves a remainder of 0 or 1 — that remainder is one binary digit. Keep going until the quotient reaches 0, then read the remainders from the last one written up to the first. Because the final remainder is the most significant bit, you assemble the answer bottom to top.

Here is decimal 13 converted:

13 ÷ 2 = 6  remainder 1
 6 ÷ 2 = 3  remainder 0
 3 ÷ 2 = 1  remainder 1
 1 ÷ 2 = 0  remainder 1
read upward → 1101

So 13 in decimal is 1101 in binary. You can verify it the other way: 8 + 4 + 0 + 1 = 13.

The subtract-the-largest-power method

If you prefer working top-down, list the powers of two that fit inside your number: 1, 2, 4, 8, 16, 32, 64, 128, 256… Find the largest power that is not bigger than your value, subtract it, place a 1 in that column, and repeat with the remainder. Any column you skip gets a 0. For 13: 8 fits (write 1, leaves 5), 4 fits (write 1, leaves 1), 2 does not fit (write 0), 1 fits (write 1) → 1101. Many people find this faster for small numbers because it matches how they already think about place value.

Reference table

DecimalBinaryDecimalBinary
111610000
510132100000
1010101001100100
15111125511111111

Notice that every exact power of two is a 1 followed by zeros, and that one less than a power of two (3, 7, 15, 31, 255) is a solid run of 1s. Spotting these patterns lets you sanity-check a conversion at a glance.

Negative decimals and bit width

Computers store negative integers in two's complement, which needs a fixed bit width. To convert a negative decimal, decide whether you are working in 8, 16, 32 or 64 bits, convert the absolute value to binary, invert every bit, then add one. The converter does this automatically: type a negative number, pick a width, and the binary row shows the correct two's complement pattern with the sign bit set.

Where it matters

  • Setting flag registers and bit masks from a human-readable value in firmware.
  • Designing subnet masks and converting prefix lengths to dotted binary.
  • Understanding how integers are stored before bitwise shifts and AND/OR operations.
  • Solving digital-logic, assembly and computer-science homework.

Frequently asked questions

How do you convert decimal to binary by hand?

Divide by 2 repeatedly, record each remainder, and read the remainders from bottom to top. Or subtract the largest fitting power of two at each step.

What is 10 in binary?

Decimal 10 is 1010 — that is 8 + 2.

What is 100 in binary?

Decimal 100 is 1100100 — that is 64 + 32 + 4.

How are negative numbers shown?

Choose a bit width and the tool renders the two's complement form, where the leftmost bit signals a negative value.