## How to Manually Convert Decimal to Binary?

##### At a glance:

**For an integer number**, divide the decimal number recursively by 2 till you get 0 as the final quotient. After this step, write down the remainders in reverse order to get the binary value.

**For the fractional part**, keep multiplying the fractional part by 2 until the remainder becomes 0. Please note that sometimes it won't become 0 even after multiplying by 2 for more than 20, 30 or 40 times. In such cases, take values up to a certain point - let's say five or eight.

##### In Detail:

Converting decimal numbers to binary involves a simple yet systematic process. In this section, we'll show you the steps to convert a decimal number to its binary representation manually. We'll use the division method, a straightforward technique for this conversion. Follow these steps to convert decimal to binary:

**Step 1:** Start by dividing the given decimal number by "2." Record both the result and the remainder.

**Step 2:** If the result is even, the division yields a whole number, and the remainder is "0."

**Step 3:** If the result is odd, it doesn't divide evenly, and the remainder is "1."

**Step 4:** Continue this process, placing each remainder in sequence until the quotient becomes zero (0).

**Step 5:** Write the remainers (from bottom to top) that you've got so far. Begin with the Most Significant Bit (MSB) at the bottom, and keep going to the top until you reach the Least Significant Bit (LSB). The output is the binary equivalent of the decimal number that we started by dividing by 2.

Let's illustrate this with an example: converting the decimal number 145 into its binary equivalent.

#Steps |
Divide by 2 |
Result/ Quotient |
Remainders |

1. |
145 ÷ 2 |
72 |
1 (LSB) ↑ |

2. |
72 ÷ 2 |
36 |
0 |

3. |
36 ÷ 2 |
18 |
0 |

4. |
18 ÷ 2 |
9 |
0 |

5. |
9 ÷ 2 |
4 |
1 |

6. |
4 ÷ 2 |
2 |
0 |

7. |
2 ÷ 2 |
1 |
0 |

8. |
1 ÷ 2 |
0 |
1 (MSB) ↑ |

Therefore, the binary equivalent for the decimal number** (145)**_{10} is **(10010001)**_{2}

(*Reminders from MSB to LSB, or from Bottom to Top*).

Now, let's consider another example involving a decimal value with a fractional part.

In this example, we will convert the decimal number ** 195.25 ** into its binary equivalent. We'll separate the conversion of the integer part and the fractional part for clarity.

**Converting the Integer Part:**

**Step 1:** Start by dividing the integer part, 195, by 2. Record both the result and the remainder.

- 195 ÷ 2 = 97 (Quotient) with remainder
**1** (LSB)
- 97 ÷ 2 = 48 (Quotient) with remainder
**1**
- 48 ÷ 2 = 24 (Quotient) with remainder
**0**
- 24 ÷ 2 = 12 (Quotient) with remainder
**0**
- 12 ÷ 2 = 6 (Quotient) with remainder
**0**
- 6 ÷ 2 = 3 (Quotient) with remainder
**0**
- 3 ÷ 2 = 1 (Quotient) with remainder
**1**
- 1 ÷ 2 = 0 (Quotient 0 has reached) with remainder
**1** (MSB)

Thus, the binary equivalent of the integer part (195) is **(11000011)**.

**Converting the Fractional Part:**

Now, we will convert the fractional part, ** .25**, into binary. Multiply 0.25 by 2 and observe the integer part and fractional part of the result. Continue multiplying the result part by 2 until we reach a fractional part equal to zero (0). Finally, write the ** integer part** of each multiplication from top to bottom to get the equivalent binary number.

- 0.25 X 2 = 0.50 (result) and integer part =
**0** (MSB)
- 0.50 X 2 = 1.00 (result) and integer part =
**1** (LSB)

Please note that the Most Significant Bit (MSB) here is at the top, and not at the bottom. Here, the integer parts from the results are **"01"**. **0** (from 0+0.5) and then **1** (from 1.0).

So, the fractional part 0.25 is equivalent to the binary number **0.01**.

Therefore, the binary equivalent of the decimal number (195.25)_{10} is **(11000011.01)**_{2}.

We will look into another example. This time it will be just a fractional number. Let's consider converting ** 0.985** into binary.

Now, we will multiply 0.985 by 2 and observe the resulting integer and fractional parts. Continue multiplying the resultant fractional part by 2 until we reach a resulting fractional part equal to zero. Then write the integer parts from the results of each multiplication from top to bottom to form the equivalent binary number.

**Please note that** reaching the fractional part to 0 in this process could take really long for many fractional numbers. So we will consider up to a certain point.

- 0.985 X 2 = 1 (MSB) + 0.97
- 0.97 X 2 = 1 + 0.94
- 0.94 X 2 = 1 + 0.88
- 0.88 X 2 = 1 + 0.76
- 0.76 X 2 = 1 + 0.52
- 0.52 X 2 = 1 + 0.04
- 0.04 X 2 = 0 + 0.08
- 0.08 X 2 = 0 + 0.16
- 0.16 X 2 = 0 + 0.32
- 0.32 X 2 = 0 + 0.64
- 0.64 X 2 = 1 + 0.28 [We can stop here and write the result till this point]
- 0.28 X 2 = 0 + 0.56
- 0.56 X 2 = 1 + 0.12
- 0.12 X 2 = 0 + 0.24
- 0.24 X 2 = 0 + 0.48
- 0.48 X 2 = 0 + 0.96
- 0.96 X 2 = 1 + 0.92 [We can also stop here and write the result till this point]
- 0.92 X 2 = 1 + 0.84
- 0.84 X 2 = 1 + 0.68
- 0.68 X 2 = 1 + 0.36
- 0.36 X 2 = 0 + 0.72
- 0.72 X 2 = 1 + 0.44
- 0.44 X 2 = 0 + 0.88
- 0.88 X 2 = 1 + 0.76
- 0.76 X 2 = 1 + 0.52
- 0.52 X 2 = 1 (LSB) + 0.04 [It has become so large and if you want, you can keep going!!!]

Here, the result would be ** 0.11111001 **[because we have considered the value up to 8 places after the decimal].

Therefore, the binary equivalent of the decimal number (0.985)_{10} is (0.11111001)_{2}.