Free binary calculator
Convert decimal numbers to binary (base 2) — enter any positive integer to see its binary representation, updated live, as you type.
On this page10 sections
Binary (base-2) representation. Only non-negative integers supported.
Results are estimates. Consult a professional.
How the binary calculator works
Binary is base-2 notation: every digit is either 0 or 1, and each position represents a power of 2. To convert a decimal number to binary, repeatedly divide by 2 and record the remainders — reading them in reverse gives the binary result. To go the other way, multiply each binary digit by its corresponding power of 2 and sum the products.
Worked example: converting 25 to binary and back
Convert the decimal number 25 to binary, then verify by converting the result back to decimal.
Decimal 0–15 in binary and hexadecimal
The first 16 values (one hex digit, one nibble) are the building blocks for all larger conversions. Memorising these makes manual binary and hex work much faster.
| Decimal | Binary | Hex |
|---|---|---|
| 0 | 0000 | 0 |
| 1 | 0001 | 1 |
| 2 | 0010 | 2 |
| 3 | 0011 | 3 |
| 4 | 0100 | 4 |
| 5 | 0101 | 5 |
| 6 | 0110 | 6 |
| 7 | 0111 | 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 |
One hex digit equals exactly 4 binary bits (one nibble), making hex a compact shorthand for binary.
Tips for working with binary numbers
A few patterns and shortcuts cut down on errors when you convert by hand or verify calculator output.
- Group into nibbles — Split binary strings into groups of 4 from the right (e.g., 11001 → 0001 1001) to read hex digits directly.
- Powers of 2 anchor points — Memorise 1, 2, 4, 8, 16, 32, 64, 128, 256. Any decimal is the sum of a subset of these.
- Check the last bit for parity — A binary number ending in 0 is even; ending in 1 is odd. Use this to spot-check your conversion instantly.
- Padding with leading zeros — Binary representations are often shown in 8-bit (byte) or 16-bit widths. Pad the left with zeros to fill the field without changing the value.
- Two's complement for negatives — Signed integers in computers use two's complement: flip all bits then add 1 to get the negative representation.
Accuracy and limitations
The division-and-remainder algorithm is exact for any non-negative integer. Decimal fractions (e.g., 0.1) can produce infinitely repeating binary sequences — just as 1/3 repeats in decimal — so this calculator handles integers only. For floating-point binary representation, see the IEEE 754 standard.
Key terms
About this calculator
Part of our math calculators suite — explore all calculators.