Decimal to Binary Converter
Convert a decimal number to its exact binary representation, with the conversion steps shown.
Enter a decimal number below - this tool converts it to binary exactly, and can show the repeated-division steps used.
More Data / Number / Computer Science Tools
View all 19For the reverse direction, see the Binary to Decimal Converter - or the Number Base Converter for other bases.
How Decimal-to-Binary Conversion Works
The classic method repeatedly divides the number by 2, recording each remainder (0 or 1) - reading the remainders from last to first gives the binary representation.
How to Use It
- Enter a non-negative integer.
- The binary equivalent appears instantly, with the conversion steps available to review.
Limitations
This handles arbitrarily large integers accurately using BigInt - negative numbers aren't converted here, since binary representation of negatives (two's complement) depends on a chosen bit width, which the Bit Shift/Bitwise tools address more directly.
Worked Example
Convert 45 to binary by dividing by 2 and writing down each remainder:
| Division | Quotient | Remainder |
|---|---|---|
| 45 ÷ 2 | 22 | 1 |
| 22 ÷ 2 | 11 | 0 |
| 11 ÷ 2 | 5 | 1 |
| 5 ÷ 2 | 2 | 1 |
| 2 ÷ 2 | 1 | 0 |
| 1 ÷ 2 | 0 | 1 |
Read the remainders from bottom to top: 101101.
A Quicker Mental Method
Subtract the largest power of 2 that fits, and repeat: 45 - 32 = 13, 13 - 8 = 5, 5 - 4 = 1, 1 - 1 = 0. The powers you used (32, 8, 4, 1) are the 1-bits: 101101.
Common Values
| Decimal | Binary |
|---|---|
| 10 | 1010 |
| 100 | 1100100 |
| 255 | 11111111 |
| 1000 | 1111101000 |
Check a result with Binary to Decimal. For hexadecimal, use Decimal to Hex; to see how many bytes a number of bits is, try the Bits to Bytes Converter.
Frequently Asked Questions
Explore More Tools
Keep going with related categories and our most used tools.