Decimal to Binary Converter
Type a decimal number to see it in binary, and in the other number bases.
Result
| Base | Value |
|---|---|
| Binary (base 2) | 1111 1111 |
| Octal (base 8) | 377 |
| Decimal (base 10) | 255 |
| Hexadecimal (base 16) | FF |
How to use it
- Type the number (spaces and prefixes such as 0x are fine).
- Check the From and To bases, or change them.
- Read the result, and the same number in every base in the table.
About this tool
To convert decimal to binary, divide the number by 2 again and again and write down the remainders. Read the remainders from last to first. For 10: 10÷2=5 r0, 5÷2=2 r1, 2÷2=1 r0, 1÷2=0 r1, which reads 1010.
Each position in the answer is a power of two, so 255 is eight 1s in a row (128+64+32+16+8+4+2+1).
Formula
- Divide by 2 repeatedly and collect the remainders from bottom to top.
Examples
- Decimal 10 = 1010 (binary)
- Decimal 42 = 0010 1010 (binary)
- Decimal 255 = 1111 1111 (binary)
- Decimal 1024 = 0100 0000 0000 (binary)
Tips
- The result is grouped in fours for readability. Remove the spaces if you need to paste it into code.
- Very long numbers are handled exactly, up to 200 digits.
- Negative numbers are accepted with a minus sign.
Questions and answers
How do I convert decimal to binary?
Divide by 2 repeatedly and collect the remainders from bottom to top.
What is 42 in binary?
42 in decimal is 0010 1010 in binary.
Can I use lowercase letters or a prefix?
Yes. Lowercase letters work, and prefixes such as 0b, 0o and 0x are accepted.
Are my numbers saved or sent anywhere?
No. The conversion runs in your browser on your own device. Nothing you type is sent to Paul Digital or any other server.
More tools
- Binary to Decimal Converter
- Decimal to Hex Converter
- Hex to Binary Converter
- Binary to Hex Converter
- All math and number tools
Privacy
The conversion runs in your browser on your own device. Nothing you type is sent to Paul Digital or any other server. Very long numbers are handled exactly.