Best uses
- Understand how computers represent decimal numbers.
- Check classwork, coding examples, or electronics values.
- Convert integers before using them in bit operations.
Convert decimal numbers to binary online with divide-by-2 steps, examples, quality checks, FAQs, and common base conversion mistakes.
To convert the whole-number part of a decimal value to binary, divide by 2 and read the remainders in reverse order. For the fractional part, multiply by 2 repeatedly and record each whole-number result until the fraction becomes 0 or reaches the precision you need. The example below shows the process:
(10.25)10 = (?)2
| Divided by 2 | Quotient | Remainder | Flow |
|---|---|---|---|
| 10 / 2 | 5 | 0 | ↓ |
| 5 / 2 | 2 | 1 | ↓ |
| 2 / 2 | 1 | 0 | ↓ |
| 1 / 2 | 0 | 1 | ↓ |
| Multiply by 2 | Result | Non-Fractional Part | Flow |
|---|---|---|---|
| .25 * 2 | 0.50 | 0 | ↓ |
| .50 * 2 | 1.00 | 1 | ↓ |
Decimal numbers are easy for people to read, while binary is the base used in digital systems. Converting decimal to binary helps with programming lessons, bitwise operations, networking examples, computer architecture, and digital electronics problems.
| 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 |
A leading minus sign describes a negative mathematical value; it is not a fixed-width computer encoding. Programming systems may store the same negative integer using two’s complement with a specified bit width, producing a different visible bit pattern. Use this page for ordinary base notation unless your task explicitly asks for an 8-bit, 16-bit, 32-bit, or 64-bit signed representation.
For a fractional decimal, repeatedly multiply the fractional part by 2 and record each whole-number digit in order. Some decimal fractions repeat indefinitely in binary, so a displayed answer may stop after a practical number of places. Convert the result back to decimal and compare within the required tolerance instead of expecting every fraction to terminate exactly.
To convert a decimal whole number to binary, divide by 2 and track the remainders. Read the remainders from bottom to top to get the binary value.
Divide by 2 repeatedly and read the remainders upward. 42 becomes 101010.
Binary is base 2, so each digit can only represent two possible values.