Decimal to Binary Converter
Convert a decimal (base-10) integer to binary (base-2) and see each division step. Binary uses only 0 and 1. For example, 13 in decimal equals 1101 in binary.
Convert decimal to binary with steps
Binary result (base 2)
Show division steps
Read the remainders from bottom to top to get the binary magnitude.
| Decimal value | Quotient | Remainder |
|---|
Conversion runs in your browser; the tool does not submit the number to a server.
How to convert decimal to binary
For a positive integer, use repeated division by 2:
- Divide the decimal integer by 2.
- Write down the whole-number quotient and the remainder (0 or 1).
- Divide the new quotient by 2. Repeat until the quotient is 0.
- Read the remainders from bottom to top.
Zero is a special case: decimal 0 is binary 0. For negative inputs, this tool converts the absolute value and adds a minus sign.
Worked example: convert 13 to binary
| Division | Quotient | Remainder |
|---|---|---|
| 13 ÷ 2 | 6 | 1 |
| 6 ÷ 2 | 3 | 0 |
| 3 ÷ 2 | 1 | 1 |
| 1 ÷ 2 | 0 | 1 |
Reading upward gives 1101. Check the answer using place values: 1 × 8 + 1 × 4 + 0 × 2 + 1 × 1 = 13.
Why binary place values work
Decimal place values are powers of 10. Binary place values are powers of 2: from right to left they are 1, 2, 4, 8, 16, 32, 64, and so on. Add the place values with a 1 to recover the decimal number.
Decimal to binary conversion 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 |
| 128 | 10000000 |
| 255 | 11111111 |
| 256 | 100000000 |
| 1024 | 10000000000 |
Negative numbers, leading zeros, and limits
By default, the result uses the shortest binary magnitude, without leading zeros. Choose a minimum width to add leading zeros; larger results are never truncated. Decimal 5 becomes 101; padding it to eight bits gives 00000101 without changing its unsigned value.
A negative result such as -1101 is a signed mathematical value, not a computer storage encoding. For example, -13 in eight-bit two’s complement is 11110011. A two’s complement conversion must specify its bit width and range.
This converter accepts up to 100 decimal digits and uses BigInt for exact integer arithmetic. It rejects fractions instead of silently rounding them. Decimal fractions can have finite or repeating binary expansions; 0.625 is 0.101, while 0.1 repeats in binary.
Frequently asked questions
How do you convert decimal to binary?
Divide a non-negative decimal integer by 2 repeatedly, recording each remainder. Stop when the quotient is 0, then read the remainders from bottom to top. For example, 13 in decimal is 1101 in binary.
What is 10 in binary?
Decimal 10 is binary 1010 because 10 = 8 + 2 = 1 × 8 + 0 × 4 + 1 × 2 + 0 × 1.
What is 255 in binary?
Decimal 255 is binary 11111111. It is the largest unsigned integer that fits in eight bits.
Can I convert negative decimal numbers?
Yes. This converter places a minus sign before the binary magnitude: -13 becomes -1101. It does not produce a fixed-width two’s complement representation, which requires a chosen bit width.
Does this converter support decimal fractions?
No. This tool accepts base-10 integers only. Fractions such as 0.625 require a different method: repeatedly multiply the fractional part by 2 and record each integer part. In that example, 0.625 equals binary 0.101.
Can it convert large decimal integers accurately?
Yes. In browsers that support JavaScript BigInt, this tool converts integers of up to 100 decimal digits without floating-point rounding. Enter digits without commas, spaces between digits, or scientific notation.
Related number conversion tools
- Binary to decimal converter — convert a binary number back to base 10.
- Decimal to hexadecimal converter — convert base 10 to base 16.
- Hexadecimal to decimal converter — convert base 16 to base 10.