Download the BYJU'S Exam Prep App for free GATE/ESE preparation videos & tests - Download the BYJU'S Exam Prep App for free GATE/ESE preparation videos & tests -

Decimal to Octal Conversion

For converting a number from the base 10 to the base 8, first, we write down the number and then divide it by the number 8. Note down the remainder obtained from the division. Ultimately, divide the quotient of the division obtained by 8. Also, the obtained remainder should be noted. This process needs to be repeated till the quotient happens to be 0. The values of the remainders need to be written in this process from the bottom to the top. Thus, it will be the answer that is required.

Before you proceed ahead with this concept, check out the basics of conversion to various bases. In this article, we will take a look at the Decimal to Octal Conversion according to the GATE Syllabus for CSE (Computer Science Engineering). Read ahead to learn more.

Table of Contents

How to Perform Decimal to Octal Conversion?

In the case of number systems, it is very crucial that one has a thorough knowledge of how one can convert various numbers from a given base to another one. In this article, we will learn how to convert some numbers from any given base 10 to base 8.

One can convert an available number from base 10 to other bases using the division method along with the multiplication method. Thus, the following two cases would be possible here:

Case 01: In the case of Numbers that Carry No Fractional Part:

Use the division method when you want to convert any such number from base 10 to any other base. Perform this division with the required base.

Here are the steps that are required for converting a number from decimal to octal:

  • Divide the available number (present in base 10 with us) with 8. Do this until the final result left happens to be less than 8.
  • Traverse the remainders available to us from bottom to top. This way, you will get the number that is required in base 8.

Case 02: In the case of Numbers that Carry a Fractional Part:

Treat the real and the fractional part separately when you want to convert any such available decimal numbers with base 10 to octal with base 8.

For the Real Part-

When you want to convert the real part of a number from decimal to any other base, the steps involved would be the same as above.

For the Fractional Part-

Use the multiplication method if you want to convert a number’s fractional part from decimal to any other base. Perform the multiplication using the required base.

Here are the steps that are required for converting a number from decimal to octal:

  • Multiply the available fraction (given in base 10) using 8.
  • Write the real and the fractional part of the result separately so as to obtain them separately.
  • Multiply the fractional part by 8.
  • Write the real and the fractional part of this obtained result separately so as to obtain it separately.
  • Repeat this procedure unless and until the fractional part happens to be 0.
  • In case the fractional part doesn’t terminate to 0, then find the result of the fraction up to as such places as required.

The Required Number in the Base 8 = A series of the real part of results obtained by multiplication, in the steps above from top to bottom.

Practice Problems on Decimal to Octal Conversion

1. Convert the given numbers from the base 10 to the base 8-

1.1. (1032)10

Answer – Here, we use the division method and get-

From here, we get (1032)10 = (2010)2

1.2. (1032.6875)10

Answer – We will use the real and the fractional part separately here.

The real part is (1032)10. Here, we will use the division method and get-

(1032)10 = (2010)8

The fractional part here is (0.6875)10. We will convert the fractional part of base 10 to base 8. Using the multiplication method here, we will get-

Fractional part Real Part
0.6875 x 8 0.5 5
0.5 x 8 0.0 8

Since the fractional part becomes 0 here, we will finally stop. The fractional part is getting terminated to 0 after 2 subsequent iterations. If we traverse the real part from top to bottom, we obtain the number in the octal base or base 8.

Thus here, (0.6875)10 = (0.54)8

If we combine the results of the real and the fractional part, we get-

(1032.6875)10 = (2010.54)8

1.3. (172)10

Answer – Here, we use the division method and get-

From here, we get (172)10 = (254)8

1.4. (172.878)10

Answer – We will use the real and the fractional part separately.

The real part is (172)10. Here, we will use the division method and get-

(172)10 = (254)8

The fractional part here is (0.878)10. We will convert the fractional part of base 10 to base 8. Here, using the multiplication method, we will get-

Fractional part Real Part
0.878 x 8 0.024 7
0.024 x 8 0.192 0
0.192 x 8 0.536 1
0.536 x 8 0.288 4

Since the fractional part does not become 0 here, we will find the values up to a total of 4 decimal places. So if we traverse the real part from top to bottom, we obtain the number in the octal base or base 8.

Thus here, (0.878)10 = (0.7014)8

If we combine the results of the real and the fractional part, we will get-

(172.878)10 = (254.7014)8

Keep learning and stay tuned to get the latest updates on GATE Exam along with GATE Eligibility Criteria, GATE 2023, GATE Admit Card, GATE Syllabus, GATE Previous Year Question Paper, and more.

Also Explore,

Comments

Leave a Comment

Your Mobile number and Email id will not be published.

*

*