Decimal to binary converter

Type a whole number to convert it to binary, with the division working shown underneath. Divide by 2 repeatedly, write down each remainder, then read the remainders from bottom to top — 13 becomes 1101.

To

Method 1: divide by 2

Converting 13:

DivisionQuotientRemainder
13 ÷ 261
6 ÷ 230
3 ÷ 211
1 ÷ 201

Read the remainders bottom-up: 1101. Check: 8 + 4 + 1 = 13 ✓

Method 2: subtract powers of two (faster for small numbers)

List the powers of two: 128, 64, 32, 16, 8, 4, 2, 1. Starting from the biggest that fits, subtract and write a 1; otherwise write a 0.

For 100: 64 fits (36 left) → 1; 32 fits (4 left) → 1; 16 no → 0; 8 no → 0; 4 fits (0 left) → 1; 2 no → 0; 1 no → 0. So 100 = 1100100.

Decimal to binary table (0–16)

DecimalBinaryDecimalBinary
0091001
11101010
210111011
311121100
4100131101
5101141110
6110151111
71111610000
8100032100000

Full list: binary numbers 0–255.

Decimal fractions to binary

For the part after the decimal point, multiply by 2 and take the whole-number part each time. 0.625 → 1.25 (1) → 0.5 (0) → 1.0 (1), so 0.625 = 0.1012. Some fractions, like 0.1, never end in binary — that is why 0.1 + 0.2 isn’t exactly 0.3 in most programming languages.

Frequently asked questions

What is 2 in binary?

2 is 10 in binary (one 2 and no 1s).

What is 100 in binary?

100 is 1100100 in binary: 64 + 32 + 4.

How do I convert decimal to binary quickly?

Subtract the largest power of two that fits (128, 64, 32 …), write 1 for each power you used and 0 for each you skipped.

How are negative numbers written in binary?

Computers usually use two’s complement: invert every bit of the positive number and add 1. In 8 bits, −5 is 11111011. See our two’s complement guide.

Keep going

Last reviewed 28 November 2026. Conversions run entirely in your browser.