Decimal to Binary
Tool processing runs in your browser — your pastes/files are not uploaded to our servers for processing. Ads (if shown) load separately and do not receive your tool inputs.Advertising · Details
Quick answer
To convert decimal to binary, divide by 2 repeatedly and read the remainders from last to first — for example 10 → 1010. TryDevSnip's converter does it instantly and exactly, even for large numbers, all in your browser.
Decimal to binary chart
| Decimal | Binary |
|---|---|
| 2 | 10 |
| 4 | 100 |
| 8 | 1000 |
| 10 | 1010 |
| 16 | 10000 |
| 32 | 100000 |
| 64 | 1000000 |
| 100 | 1100100 |
| 128 | 10000000 |
| 255 | 11111111 |
Reverse or related: binary to decimal · decimal to hex · hex to decimal · all bases
Worked example: 42
Every positional number system works the same way — each digit is multiplied by the base raised to its position, counting from zero on the right. For 42 in decimal:
| Digit | Place | Weight | Contribution |
|---|---|---|---|
| 4 | 101 | 10 | 40 |
| 2 | 100 | 1 | 2 |
| Total (decimal) | 42 | ||
Written in binary that is 0b101010.
Quick reference
| Decimal | decimal | binary |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 2 | 10 |
| 4 | 4 | 100 |
| 8 | 8 | 1000 |
| 10 | 10 | 1010 |
| 16 | 16 | 10000 |
| 32 | 32 | 100000 |
| 64 | 64 | 1000000 |
| 100 | 100 | 1100100 |
| 128 | 128 | 10000000 |
| 255 | 255 | 11111111 |
| 256 | 256 | 100000000 |
Things that trip people up
- Prefixes are notation, not value.
0b1010,0o12,0xAand10can all denote the same quantity. Strip the prefix before parsing, or tell the parser which base you meant. - Leading zeros can change the base. In several languages a leading
0historically meant octal, so010parsed as 8 rather than 10. Passing an explicit radix avoids the whole class of bug. - Hex letters are case-insensitive.
0xffand0xFFare the same number; only presentation differs. - Grouping is for humans. Binary is usually read in nibbles of four (
1111 1111) because each nibble maps to exactly one hex digit — which is why hex is the usual shorthand for binary data.
Frequently asked questions
How do I convert decimal to binary?
Divide the number by 2 repeatedly, writing down the remainders (0 or 1) from last to first. For example 10 → 1010. Or paste it into the converter and read the binary instantly.
What is 255 in binary?
255 (decimal) is 11111111 in binary — eight 1-bits, exactly one full byte.
Does it work for large numbers?
Yes. The converter uses BigInt, so large decimals convert to exact binary strings without losing bits.
Is my input uploaded?
No. TryDevSnip converts locally in your browser. Nothing you type is uploaded to our servers for processing.