Method 1: divide by 2
Converting 13:
| Division | Quotient | Remainder |
|---|---|---|
| 13 ÷ 2 | 6 | 1 |
| 6 ÷ 2 | 3 | 0 |
| 3 ÷ 2 | 1 | 1 |
| 1 ÷ 2 | 0 | 1 |
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)
| Decimal | Binary | Decimal | Binary |
|---|---|---|---|
| 0 | 0 | 9 | 1001 |
| 1 | 1 | 10 | 1010 |
| 2 | 10 | 11 | 1011 |
| 3 | 11 | 12 | 1100 |
| 4 | 100 | 13 | 1101 |
| 5 | 101 | 14 | 1110 |
| 6 | 110 | 15 | 1111 |
| 7 | 111 | 16 | 10000 |
| 8 | 1000 | 32 | 100000 |
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.