## How to Manually Convert Decimal to Octal?

##### At a glance:

**To convert an integer number**, divide the number recursively by 8 until you get 0 as the final quotient. Afterwards, write down the remainders in reverse order to get the octal value."

**For the fractional part**, keep multiplying the fractional part by 8 until the fraction part becomes 0. Sometimes, the fraction part might not become 0 even after many multiplications. In such cases, take values up to a certain point, such as five or eight places.

##### In Detail:

Converting decimal numbers to octal involves a systematic process, similar to converting to binary. While converting decimal to binary, you do the operation (division or multiplication) by 2 because the base of the binary number system is "2".
Similarly, while converting from decimal to octal, you need to do the operations by 8. This is because the base of the octal number system is "8". The rest of the process is the same.
Here, we'll show you the steps to manually convert a decimal number to its octal representation using the division method.

**Step 1:** Start by dividing the given decimal number by "8". Record both the result (quotient) and the remainder.

**Step 2:** If the quotient is note 0, the remainder is anything between "0 to 7".

**Step 3:** Continue this process until you get a quotient of zero (0).

**Step 4:** Write the result (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) at the top.
The output is the octal equivalent of the decimal number that we started by dividing by 8.

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

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

1. |
286 ÷ 8 |
35 |
6 (LSB) ↑ |

2. |
35 ÷ 8 |
4 |
3 |

3. |
4 ÷ 8 |
0 |
4 (MSB) ↑ |

Therefore, the octal equivalent for the decimal number** (286)**_{10} is **(436)**_{8}

(*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 **526.25** into its octal 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, 526, by 8. Record both the result (quotient) and the remainder.

- 526 ÷ 8 = 65 with remainder
**6** (LSB)
- 65 ÷ 8 = 8 with remainder
**1**
- 8 ÷ 8 = 1 with remainder
**0**
- 1 ÷ 8 = 0 with remainder
**1** (MSB)

Thus, the octal equivalent of the integer part (526)_{10} is **(1016)**_{8}.

**Converting the Fractional Part:**

Now, we will convert the fractional part, **.25**, into octal.
Multiply 0.25 by 8 and observe the integer and fractional parts of the result. Continue multiplying the resultant fractional part by 8 until we reach a fractional part equal to zero (or very close). Write the integer parts from the results of each multiplication to form the equivalent octal number.

- 0.25 X 8 = 2 (integer part) + 0 (fractional part)

Here, the result would be **2** as we've reached 0 in the fractional part.

Therefore, the octal equivalent of the decimal number **526.25** is **(1016.2)**_{8}.

Now, let's explore one more example - converting the decimal number **0.345** into its octal equivalent.

For this fractional number, we will multiply 0.345 by 8 and continue the process until we get a fractional part equal to zero (0) or do the multiplication several times.

- 0.345 X 8 = 2 (MSB) + 0.760
- 0.760 X 8 = 6 + 0.080
- 0.080 X 8 = 0 + 0.640
- 0.640 X 8 = 5 + 0.120
- 0.120 X 8 = 0 + 0.960
- 0.960 X 8 = 7 + 0.680
- 0.680 X 8 = 5 + 0.440
- 0.440 X 8 = 3 + 0.520
- 0.520 X 8 = 4 + 0.160
- 0.160 X 8 = 1 + 0.280
- 0.280 X 8 = 2 + 0.240
- 0.240 X 8 = 1 (LSB) + 0.92 [It is not producing "0", so we can stop here and write the result till this point]

Therefore, the octal equivalent of the decimal number **0.345** is **(0.260507534121)**_{8}.