Number System

Decimal to Octal conversion

Let the decimal number be 26 so we can convert it to octal by dividing the number with the base=8  and then write the quotient and remainder as shown below and then again divide the quotient with the base till we get quotient as zero. This method is also called Oct-dabble method.

Conversion of fraction from decimal to octal is similar to the one for binary and follows the following procedure: just multiply the fraction by base=8 and integer which we get to left of the decimal point is saved

Fraction is 0.3875

0.3875 * 8                            =3.1000                =3 + 0.1000         a-1=3

0.1000 * 8                            =0.8000                =0 + 0.8000         a-2=0

0.8000 * 8                            =6.4000                =6 + 0.4000         a-3=6

0.4000 * 8                            =3.2000                =3 + 0.2000         a-4=3

And let me re-write the same facts about the procedure followed above. It may go on till we get the fractional part as zero but this may not be possible in finite no of bits hence usually we restrict the no of bits to represent the value to a finite value and get an approximate value…

So the (0.3875)10 = 0.a-1 a-2 a-3 a-4 ……= (0.3063….) 8 = (0.3063)8

If we convert the value (0.3063)2 back to decimal

=3 * 8-1 + 0 * 8-2 + 6 * 8-3 + 3 *8-4 =0.3777 which is only approximate value of the actual value. So we see the equivalent we get in nay number system for a fraction may only be an approximate value. The same again that we may increase the no of bits to increase the accuracy.

8 Replies to “Decimal to Octal conversion

  1. Pingback: ภาษี
  2. I do not know if it’s just me or if perhaps everybody else experiencing
    issues with your website. It appears as though some of
    the text on your content are running off the screen. Can somebody else please provide feedback and let me know if this is happening
    to them too? This may be a issue with my internet browser because
    I’ve had this happen previously. Many thanks

  3. Pingback: sex trẻ em

Leave a Reply

Your email address will not be published. Required fields are marked *