How to convert decimal to binary
Divide by 2 repeatedly and write down the remainders. Reading them from bottom to top gives the answer. For 755:
755 ÷ 2 = 377 remainder 1 377 ÷ 2 = 188 remainder 1 188 ÷ 2 = 94 remainder 0 94 ÷ 2 = 47 remainder 0 47 ÷ 2 = 23 remainder 1 23 ÷ 2 = 11 remainder 1 11 ÷ 2 = 5 remainder 1 5 ÷ 2 = 2 remainder 1 2 ÷ 2 = 1 remainder 0 1 ÷ 2 = 0 remainder 1
Remainders bottom to top: 1011110011.
Decimal to binary table
| Decimal | Binary |
|---|---|
0 | 0 |
1 | 1 |
2 | 10 |
3 | 11 |
4 | 100 |
5 | 101 |
6 | 110 |
7 | 111 |
8 | 1000 |
9 | 1001 |
10 | 1010 |
11 | 1011 |
12 | 1100 |
13 | 1101 |
14 | 1110 |
15 | 1111 |
16 | 10000 |
32 | 100000 |
64 | 1000000 |
100 | 1100100 |
127 | 1111111 |
128 | 10000000 |
255 | 11111111 |
256 | 100000000 |
1024 | 10000000000 |
4096 | 1000000000000 |
65535 | 1111111111111111 |
FAQ
How are negative numbers converted?
Without a bit width, the sign is kept: −255 becomes −FF. Choose a bit width and turn on Signed to use two's complement, the way computers store negative numbers: −1 in 8 bits is FF.
Is there a size limit?
No practical one. Arbitrary-precision integers (BigInt) convert even 100-digit numbers exactly. Fractions aren't supported.
Can I paste 0x, 0b or 0o prefixes, spaces or underscores?
Yes. Prefixes are recognized, and spaces or underscores between digits (like 1111_0000) are ignored. Put several numbers on separate lines to convert them all at once.
Is my data uploaded?
No. Everything is converted in your browser. Privacy