The following calculator will help you to convert a Decimal number to a Octal number.

In this example, we will convert a positive decimal number (**50**) to a octal number (**62**).

Number | Calculation | Simplify |
---|---|---|

50 | 8^{0} |
1 |

50 | 8^{1} |
8 |

50 | 8^{2} |
64 |

**Note**: 64 is greater than 50, so, stop the table.

Calculation | Quotient | Remainder |
---|---|---|

50 / 8 | 6 | 2 |

2 / 1 | 2 | 0 |

**50** (decimal) = **62** (Octal)

**Note**: Read the Quotient from top to bottom.

**Explanation**: 8 and 1 in 'Calculation' column of table 2 is taken from the 'Simplify' column of table 1.

In this example, we will convert a negative decimal number (**-100**) to a octal number (**-144**).

Number | Calculation | Simplify |
---|---|---|

100 | 8^{0} |
1 |

100 | 8^{1} |
8 |

100 | 8^{2} |
64 |

100 | 8^{3} |
512 |

**Note**: 512 is greater than 100, so, stop the table.

Calculation | Quotient | Remainder |
---|---|---|

100 / 64 | 1 | 36 |

36 / 8 | 4 | 4 |

4 / 1 | 4 | 0 |

**-100** (decimal) = **-144** (Octal)

**Note**: Read the Quotient from top to bottom.

**Explanation**: 64, 8 and 1 in 'Calculation' column of table 2 is taken from the 'Simplify' column of table 1. For negative decimal to octal number, proceed the steps as same as positive decimal to octal number and finally multiply the output by '-1'.

In this example, we will convert a fractional decimal number (**5.015625**) to a octal number (**5.01**).

Here, we have to split the fractional binary number into two parts.

- Integer part - 5
- Fraction part - 0.015625

Now, convert the **Integer part** of the given binary number (5) into a octal number.

Number | Calculation | Simplify |
---|---|---|

5 | 8^{0} |
1 |

5 | 8^{1} |
8 |

**Note**: 8 is greater than 5, so, stop the table.

Calculation | Quotient | Remainder |
---|---|---|

5 / 1 | 5 | 0 |

**5** (decimal) = **5** (octal)

**Note**: Read the Quotient from top to bottom.

**Explanation**: 1 in 'Calculation' column of table 2 is taken from the 'Simplify' column of table 1.

Now, convert the **Fraction part** of the given binary number (0.015625) into a octal number.

Number | Calculation | Simplify | Integer | fraction |
---|---|---|---|---|

0.015625 | 0.015625 * 8 | 0.125 | 0 | 0.125 |

0.125 | 0.125 * 8 | 1.0 | 1 | 0 |

**0.015625** (decimal) = **.01** (octal)

**Note**: There is no fraction part, so, stop the table and read the Integer from top to bottom.

Now, add both the results

**5.015625** = 5 + 0.1

**5.015625** (binary) = 5.01 (octal)

C Program to Converter a Decimal to Octal
C++ Program to Converter a Decimal to Octal
C# Program to Converter a Decimal to Octal
Java Program to Converter a Decimal to Octal
PHP Program to Converter a Decimal to Octal
Python Program to Converter a Decimal to Octal