Decimal to Binary Converter
The Decimal to Binary Converter takes a plain base-10 number and works out its binary representation for you. Type your value into the Decimal Input field, click Convert, and your binary string shows up in Binary Output — handy the next time you need to check a bit pattern by hand. Use the text to hex converter to translate a string of text into hex values without writing any conversion code yourself.
Understanding the Decimal to Binary Converter: Two Number Systems Side by Side
What Is the Decimal Numeral System?
The decimal numeral system, also called base-10, is the everyday number system built from ten digits: 0 through 9. Each digit's position carries a specific weight determined by a power of 10, so the value of a decimal number depends on both the digit and where it sits. For example:
2345 = (2 × 103) + (3 × 102) + (4 × 101) + (5 × 100)
This positional system is the foundation of everyday arithmetic — and it's exactly what a decimal to binary converter has to unpack before it can produce a binary result.
How the Binary Numeral System Works
The binary numeral system (base 2) is the native language of digital hardware. It uses just two symbols, 0 and 1 — each binary digit (bit) is effectively a switch that's either off (0) or on (1). Just like decimal, each position in a binary number carries a weight, but here it's a power of 2:
For example, the binary number 11012:
$$ (1 \times 2^3) + (1 \times 2^2) + (0 \times 2^1) + (1 \times 2^0) = 8 + 4 + 0 + 1 = 13_{10} $$
- Each binary digit increases in significance from right to left.
- The rightmost bit represents \(2^0\), the "ones" place.
- Binary is the shared language every digital system ultimately speaks, from a microcontroller register to a 64-bit server CPU.

Manual Decimal to Binary Conversion: The Division-by-Two Method
Step-by-Step: Converting a Whole Decimal Number
To convert decimal to binary by hand, repeated division by 2 is the standard technique — every remainder becomes the next binary digit. Here's the process:
- Divide the decimal number by 2.
- Write down the remainder — it will be a 0 or 1.
- Replace the number with the quotient from that division.
- Repeat until the quotient reaches zero.
- Read the remainders in reverse order (last to first) to get the binary result.
while N > 0:
remainder = N % 2
N = N // 2
append remainder to result
# reverse the collected remainders for the final answerWorked Examples: Decimal to Binary Conversion Step by Step
Example 1: Converting Decimal 10 to Binary
| Decimal | Divisor | Quotient | Remainder |
|---|---|---|---|
| 10 | 2 | 5 | 0 |
| 5 | 2 | 2 | 1 |
| 2 | 2 | 1 | 0 |
| 1 | 2 | 0 | 1 |
Reading the remainder column from bottom to top gives 1010. So, 1010 = 10102.
# Python
print(bin(10).replace('0b','')) # Output: 1010Example 2: Converting Decimal 25 to Binary
| Decimal | Divisor | Quotient | Remainder |
|---|---|---|---|
| 25 | 2 | 12 | 1 |
| 12 | 2 | 6 | 0 |
| 6 | 2 | 3 | 0 |
| 3 | 2 | 1 | 1 |
| 1 | 2 | 0 | 1 |
Reading the remainders bottom to top gives 11001. So, 2510 = 110012.
// Java
Integer.toBinaryString(25); // Output: 11001Example 3: A Very Large Decimal Number
Because this converter uses arbitrary-precision arithmetic (JavaScript BigInt) rather than a fixed 32-bit or 64-bit integer type, it doesn't fall over on large decimal input. A number like 9007199254740993 — one past the largest integer a standard JavaScript Number can represent exactly — still converts correctly:
9007199254740993 → 100000000000000000000000000000000000000000000000000001This matters for anyone checking values that exceed the range of a typical 32-bit or 64-bit calculator, without needing to split the number into chunks manually.
Decimal to Binary Conversion Table & Reference for Common Values
Common Values Conversion Table
An at-a-glance conversion chart is useful for comparing decimal, binary, and hex results side by side. Here's a reference for decimal values 0 through 25, plus a few round numbers:
| Decimal | Binary | Hex |
|---|---|---|
| 0 | 0 | 0 |
| 1 | 1 | 1 |
| 2 | 10 | 2 |
| 3 | 11 | 3 |
| 4 | 100 | 4 |
| 5 | 101 | 5 |
| 6 | 110 | 6 |
| 7 | 111 | 7 |
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| 10 | 1010 | A |
| 11 | 1011 | B |
| 12 | 1100 | C |
| 13 | 1101 | D |
| 14 | 1110 | E |
| 15 | 1111 | F |
| 16 | 10000 | 10 |
| 17 | 10001 | 11 |
| 20 | 10100 | 14 |
| 25 | 11001 | 19 |
| 32 | 100000 | 20 |
| 100 | 1100100 | 64 |
| 256 | 100000000 | 100 |
This table is handy for quickly checking small integer values without running the converter — especially useful in networking, hardware register, and computer science coursework contexts where the same few small numbers come up repeatedly.
Standard Word Sizes for Reference
- 8-bit: represents decimal 0–255.
- 32-bit: represents decimal 0–4,294,967,295 (unsigned).
- 64-bit: represents decimal 0–18,446,744,073,709,551,615 (unsigned).
The converter itself isn't limited to any of these widths — because it uses BigInt arithmetic, it will keep producing a correct binary string well past 64-bit range, which is where a typical hardware calculator or 32/64-bit programming type would overflow.
Using the Decimal to Binary Converter: Input Format and Batch Conversion
What Counts as Valid Input
Type or paste a whole decimal number — digits 0 through 9 only — into the Decimal Input field. Spaces between digits are ignored automatically, so pasting a number copied with grouping spaces (like 1 000 000) still works. Any character outside 0–9 triggers a clear error message telling you exactly which line is invalid, rather than silently producing a wrong result.
Converting Multiple Values at Once
To convert more than one decimal number in a single pass, put each value on its own line in the input box — every line converts independently, in order, and the matching binary results appear in the same order in the Binary Output box. This is useful for checking a whole list of register values or homework answers at once instead of one at a time.
Why Arbitrary-Precision Matters
Many online decimal-to-binary calculators quietly cap out at 32-bit or 64-bit integer ranges, silently producing wrong output — or an error — for anything larger. Because this converter uses JavaScript's BigInt type internally, it isn't limited that way: you can convert decimal values with dozens of digits and still get a correct binary string, which matters for cryptography-adjacent coursework, large counters, and anyone verifying values that a pocket calculator can't hold.
Whether you're teaching binary place value, checking a homework answer, or converting a batch of decimal values from a data dump, this decimal to binary converter gives you an instant, accurate result for whole numbers of any size — no manual division required.