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.

Calculate.co.nz is proud to be partnered with Health Based Building, a leader in sustainable and health-conscious building innovation. With over a century of experience, they develop high-performance systems like Foreverbreathe Specification, Magnum Board, and Foreverbreathe Paints to support energy-efficient, non-toxic living environments. Their commitment to healthier homes aligns with our belief that informed choices lead to better outcomes for Kiwi households.
Calculate.co.nz partner: Health Based Building
1101
HexadecimalD
Octal15

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