Decimal to Binary Calculator
This decimal to binary calculator converts an ordinary base ten whole number into binary, the base two number system that every computer uses internally to store and process data. You simply enter a whole number, positive or negative, and the calculator instantly returns three results together: the binary form built from 0s and 1s, the hexadecimal equivalent, and the octal equivalent, so you can compare all three number systems at a glance. Binary works by giving each digit position a value double the one to its right, so converting by hand means dividing the number repeatedly by 2 and reading the remainders from the last one back to the first, exactly as shown in the worked example on this page using 13, which becomes 1101 in binary, D in hexadecimal and 15 in octal. If you enter a negative number, the calculator works with its magnitude and adds a leading minus sign to the result; anyone needing a fixed-width signed format instead should use the two’s complement calculator. This tool suits students learning number systems, programmers debugging bit-level logic, and anyone curious about how computers represent numbers under the hood. It assumes you enter a genuine whole number, uses exact integer arithmetic rather than an approximation, and groups very large results for easier reading. Update the number at any time and every result recalculates immediately.
The formula
To convert to binary, repeatedly divide the number by 2 and record the remainders, then read them from last to first. Each binary digit is a power of two, so 1101 is 8 + 4 + 0 + 1 = 13.
Worked example
13 divided by 2 gives remainders 1, 0, 1, 1 reading upward, so 13 in binary is 1101. In hexadecimal it is D and in octal 15. Enter 13 to confirm.
Frequently asked questions
How do I convert decimal to binary by hand?
Divide by 2 repeatedly, noting each remainder, then read the remainders from bottom to top.
What is 13 in binary?
1101, which is 8 + 4 + 1.
How are negatives handled?
This calculator shows the magnitude with a minus sign. For signed fixed-width binary, use the two’s complement calculator.
Who this calculator is for
This calculator is for students, programmers and anyone exploring number theory.
What this calculator assumes
- You enter a whole number within the stated range.
- The exact integer algorithm is used.
- Very large results are shown grouped for readability.
Formula and sources
Related calculators
- Prime Factorization Calculator: break a number into prime factors.
- LCM Calculator: lowest common multiple.
- GCF Calculator: greatest common factor.