Decimal to Binary Conversion, Step by Step With Examples
Quick Answer
To know how to convert decimal to binary by hand, repeatedly divide the number by 2, write down each remainder (0 or 1), and keep dividing the quotient until it reaches 0. Reading those remainders from bottom to top gives you the binary result. The full binary conversion method including the reverse process, fractional numbers, and a shortcut for converting straight to hexadecimal is below. For an instant result, use our binary converter.
The division-by-2 method is the standard binary conversion method taught in computer science courses, and once you've done it by hand a couple of times, you'll never forget it it's really just the same long-division logic you already know, applied to base 2 instead of base 10. Below is a full worked example with a larger number, the reverse process for going from binary back to decimal, and two things most explanations skip entirely: converting a decimal fraction, and a shortcut for jumping straight from binary to hexadecimal.
Decimal to Binary: The Division Method
Rule: Divide by 2 repeatedly. Record the remainder at each step. Stop when the quotient reaches 0. Read the remainders from bottom to top.
Worked example: Convert 156 to binary.
| Step | Division | Quotient | Remainder |
|---|---|---|---|
| 1 | 156 ÷ 2 | 78 | 0 |
| 2 | 78 ÷ 2 | 39 | 0 |
| 3 | 39 ÷ 2 | 19 | 1 |
| 4 | 19 ÷ 2 | 9 | 1 |
| 5 | 9 ÷ 2 | 4 | 1 |
| 6 | 4 ÷ 2 | 2 | 0 |
| 7 | 2 ÷ 2 | 1 | 0 |
| 8 | 1 ÷ 2 | 0 | 1 |
Reading the remainder column from the bottom row up: 1 0 0 1 1 1 0 0
156 in decimal = 10011100 in binary
The Mistake That Breaks This Method Every Time
Reading the remainders top-to-bottom instead of bottom-to-top produces a completely different (and wrong) binary value it's the single most common error in this method. The last remainder you calculate is actually the first digit of your answer, because it represents the highest-value bit position.
Binary to Decimal: The Reverse Method
Going the other direction uses positional place values each position in a binary number represents a power of 2, starting from 2⁰ on the right.
Worked example: Convert 10011100 back to decimal, to verify the result above.
| Position (left to right) | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 |
|---|---|---|---|---|---|---|---|---|
| Power of 2 | 2⁷ | 2⁶ | 2⁵ | 2⁴ | 2³ | 2² | 2¹ | 2⁰ |
| Value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
Only the positions with a 1 contribute to the total: 128 + 16 + 8 + 4 = 156
This confirms the division method above produced the correct result.
Converting a Decimal Fraction to Binary
This part trips up almost everyone, because the division method only works for whole numbers fractions need a completely different approach: multiply by 2 repeatedly, and this time you read the result top to bottom instead of bottom to top.
Worked example: Convert 0.625 to binary.
| Step | Multiplication | Result | Integer Part (the bit) |
|---|---|---|---|
| 1 | 0.625 × 2 | 1.25 | 1 |
| 2 | 0.25 × 2 | 0.50 | 0 |
| 3 | 0.50 × 2 | 1.00 | 1 |
Once the fractional part reaches exactly 0, you stop. Reading the integer-part column top to bottom: 1 0 1
0.625 in decimal = 0.101 in binary
Not every decimal fraction terminates this cleanly many (like 0.1) repeat infinitely in binary, which is actually the underlying reason some decimal values can't be represented with perfect precision in computer floating-point arithmetic.
Shortcut: Binary Straight to Hexadecimal
If you ever need to convert a binary number to hex, there's a shortcut that avoids going through decimal entirely: group the binary digits into sets of 4, starting from the right, and convert each group independently.
Worked example: Convert 10011100 to hex using this shortcut.
Group into 4s: 1001 1100
1001 = 9 in decimal = 9 in hex
1100 = 12 in decimal = C in hex
Combined: 9C
This works because each hex digit represents exactly 4 binary bits (since 16 = 2⁴), which is also why hexadecimal is so commonly used in programming it's a far more compact way to represent binary data than writing out long strings of 1s and 0s. If you need to convert further, from hex into decimal or back, our hex converter handles that instantly.
Frequently Asked Questions
The division-by-2 method: repeatedly divide the number by 2, recording the remainder at each step, until the quotient reaches 0. Reading the remainders from bottom to top gives you the final binary number.
Because the first remainder you calculate represents the lowest-value bit (the rightmost digit), and the last remainder represents the highest-value bit (the leftmost digit). Reading top to bottom would reverse the entire number.
Use the multiply-by-2 method instead of division: repeatedly multiply the fractional part by 2, recording the integer part (0 or 1) at each step, until the fraction reaches exactly 0. Unlike the whole-number method, this one is read top to bottom.
Because not every decimal fraction has an exact binary equivalent some, like 0.1, produce a repeating binary pattern that never terminates. This is the underlying reason certain decimal numbers can't be stored with perfect precision in computer floating-point systems.
Yes group the binary digits into sets of 4 starting from the right, then convert each group to its hex digit independently. This works because one hex digit always corresponds to exactly 4 binary bits, making it much faster than converting through decimal as an intermediate step.