# Online Decimal to Octal converter

Online Web Code Test |
Online Image Picker |
Online Color Picker

# Decimal to Octal converter

#### Decimal to Octal

A number with base 8 is the octal number and a number with base 10 is the decimal number. Here we will convert a decimal number to an equivalent octal number. It is same as converting any decimal number to binary or decimal to hexadecimal.

In decimal to binary, we divide the number by 2, in decimal to hexadecimal we divide the number by 16. In case of decimal to octal, we divide the number by 8 and write the remainders in the reverse order to get the equivalent octal number.

#### How to convert from Decimal to Octal

Follow the steps given below to learn the decimal to octal conversion:

1. Write the given decimal number.

2. If the given decimal number is less than 8 the octal number is the same.

3. If the decimal number is greater than 7 then divide the number by 8.

4. Note the remainder, we get after division

5. Repeat step 3 and 4 with the quotient till it is less than 8

Now, write the remainders in reverse order (bottom to top)

The resultant is the equivalent octal number to the given decimal number.

#### Example:

Convert (127)10 to Octal.

Solution: Divide 127 by 8

127 ÷ 8= 15(Quotient) and (7)Remainder

Divide 15 by 8 again.

15 ÷ 8 = 1(Quotient) and (7) Remainder

Divide 1 by 8, we get;

1 ÷ 8 = 0(Quotient) and (1) Remainder

Since the quotient is zero now, no more division can be done. So by taking the remainders in reverse order, we get the equivalent octal number.

Hence, (127)_{10} = (177)_{8}