Home » Digital Electronics

Conversion of Decimal Number System into Octal Number System

Here, we are going to learn how to convert Decimal Number System into Octal Number System?
Submitted by Saurabh Gupta, on October 12, 2019

Converting a number from Decimal to Octal is almost similar to converting Decimal into Binary, although just one difference is that unlike Binary conversion, here in an integral part, we successively divide the number by 8 until the quotient is 0 (the last remainder becomes the MSB). The remainders read from bottom to top give the equivalent octal integer number. and in the fractional part, we multiply it by 8 till the fractional part of the product is 0. The first integer in the product term gives the MSB, thus the integers read from top to bottom gives the equivalent octal fraction.

Same as in decimal to binary conversion, to convert a mixed decimal number into octal, we first separate the integral and the fractional part and then convert them into octal individually, after converting both to octal separately, we combine them back together to get the desired result.

Example 1:

Convert (73.625)10 to ( ? )8

Solution:

Firstly, we will separate the integral part (73)8 and the fractional part (0.625)8. Now, we will convert each of them to octal individually.

Integral Part

Divisor Quotient Remainder
873
891 LSB
811
801 MSB

All the remainders read from top to bottom, where topmost is the LSB and bottom one is the MSB.

Therefore, (73)10 = (111)8

Fractional Part

    0.625 * 8 = 5.000

The integer part of the product term read from top to bottom forms the equivalent octal number i.e., (.625)10 = (0.5)8

After converting both integral part and fractional part individually into octal, now we combine both to get our desired result i.e., (73.625)10 = (111.5)8

Example 2:

Convert (965.198)10 to ( ? )8

Solution:

Integral Part

Divisor Quotient Remainder
8965
81205 LSB
8150
817
801 MSB

The remainders read from bottom to top gives the equivalent octal number i.e., (965)10 = (1705)8.

Fractional Part

    0.198 * 8 = 1.584	MSB
    0.584 * 8 = 4.672
    0.672 * 8 = 5.376
    0.376 * 8 = 3.008
    0.008 * 8 = 0.064
    0.064 * 8 = 0.512	LSB

The integer part of the product term read from top to bottom forms the equivalent octal number i.e., (0.198)10 = (0.145300)8.

After converting both integral part and fractional part individually into octal, now we combine both to get our desired result i.e., (965.198)10 = (1705.145300)8

Example 3:

Convert (296.225)10 to ( ? )8

Solution:

Integral Part

Divisor Quotient Remainder
8296
8370 LSB
845
804 MSB

The remainders read from bottom to top gives the equivalent octal number i.e., (296)10 = (450)8.

Fractional Part

    0.225 * 8 = 1.80    MSB
    0.80  * 8 = 0.64
    0.64  * 8 = 5.12
    0.12  * 8 = 0.96
    0.96  * 8 = 7.68     LSB

The integer part of the product term read from top to bottom forms the equivalent octal number i.e., (0.198)10 = (0.10507)8.

After converting both integral part and fractional part individually into octal, now we combine both to get our desired result i.e., (296.225)10 = (450.10507)8.






Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.




Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.