Decimal to Binary Converter
Every decimal number can be written in binary as a sum of powers of two. The classic method is repeated division by two, collecting the remainders from bottom to top to form the bit string.
Enter a decimal value below to see its binary representation appear instantly. Only digits 0–9 are accepted, and the conversion runs locally in your browser with no upload.
| Decimal | Binary | Note |
|---|---|---|
1 | 1 | single bit |
2 | 10 | first power of two |
10 | 1010 | 8 + 2 |
15 | 1111 | all bits set |
255 | 11111111 | max 8-bit value |
10→101010 = 8 + 2, so bits at positions 8 and 2 are set.
Frequently asked questions
How do I convert decimal to binary by hand?
Divide the number by 2 repeatedly, recording each remainder. Reading the remainders from last to first gives the binary digits. For 10 you get remainders 0,1,0,1 → 1010.
Why do computers use binary?
Digital circuits are built from switches with two stable states (on/off), which map naturally to 1 and 0. Binary is therefore the most reliable way to represent and process data in hardware.
Can I convert negative decimals?
This tool converts the magnitude of whole numbers. Representing negatives typically uses two's complement at a fixed width, which depends on the integer size your system uses.
Does my number leave the browser?
No. The conversion is computed locally with JavaScript and nothing is uploaded.