Decimal to Octal Conversion



Decimal to Octal Conversion

We can convert a mixed decimal number (having integer and fractional parts) to its equivalent octal number. For this, we convert the integer and fractional parts separately.

To convert the integer part of the given decimal number to octal, we divide the given decimal number successively by 8 till the quotient is 0. The octal equivalent is obtained by reading the remainders from bottom to top, where the last remainder will be the most significant digit.

To convert the fractional part of the given decimal number to octal, we multiply the given decimal fraction successively by 8 till the product is 0 or the desired accuracy is obtained. The fractional part of the equivalent octal number is obtained by reading the carries from top to bottom.

Lets understand the decimal to octal conversion with the help of examples.

Example

Convert (589.278)10 to octal.

Solution

The given decimal number is a mixed number with 589 as integer part and 0.278 as fractional part. Thus, we first convert the integer part to octal and then we convert the fractional part to octal.

Converting Integer Part (589)10 to Octal −

Decimal Remainders
8 589
8 73 5
8 9 1
8 1 1
0 1

Reading the remainders from bottom to top, the equivalent octal of (589)10 is (1115)8.

Converting the Fractional Part (0.278)10 to Octal −

Decimal Product Carry
0.278 × 8 2.224 2
0.224 × 8 1.792 1
0.792 × 8 6.336 6
0.336 × 8 2.688 2

Reading the carries from top to bottom to obtain the fractional part of the equivalent octal number, the result is (0.2162)8.

Thus, the equivalent octal number of (589.278)10 is (1115.2162)8.

Advertisements