Page 57 - Computer Science Class 11 Without Functions
P. 57

Conversion of Hexadecimal Fractions to Decimal

            To convert an hexadecimal fraction to decimal, we use place values (base 16) and follow the following steps:
            1.  Write the hexadecimal number.
            2.  Below each digit, write the place value of each digit position.
            3.  Multiply the face value of each digit with its place value.

            4.  Add all values obtained in step 3 to get the decimal number.
            Example 33: Convert (0.A6)  to its equivalent decimal number.
                                    16
              Face Value         0  .       A         6
                                             –1
              Place value                 16         16 –2
                = A × 16  + 6 × 16 –2
                       –1
                =  A   +   6
                 16   256

                =  10  +   6
                 16   256
                = 0.625 + 0.023

                = (0.648) 10
            So, (0.A6) 16   = (0.648) 10   ≠ (0.65) 10   because while converting (0.65) to a hexadecimal number, we discarded the
                                                                         10
            hexadecimal digits appearing beyond two places after the radix point.
            Example 34: Convert (2C1.CF5)  to its equivalent decimal number.
                                        16
            Note that we retain four decimal digits in each computation if only three significant digits after the decimal point are
            required. Thus we may write:
                12
                   = 0.7500
                16
                15   = 0.0585 (truncate after four digits)
                256

                 5   = 0.0012(truncate after four digits)
                4096
            So,  12  +   15   +   5   = 0.75 + 0.0585 + 0.0012 = 0.8097 = 0.809 (truncate after three digits)
               16   256   4096



                    Find decimal representation of (0.2) , (0.4) , (0.C) .
                                                 16
                                                       16
                                                             16

            Conversion of Fractional Binary Numbers to Octal
            To convert a fractional binary number to its equivalent octal number, form groups of three bits, starting from left to
            right after the radix point. If the number of bits is not a multiple of three, append the required number of 0s on the
            right end. Finally, replace each group of three bits with an equivalent octal digit.
            Example 35: Convert (0 .1011)  to an equivalent octal number.
                                       2
                        two 0s added

                .1   0   1 1    0     0


                   5        4
                (.1011)  = (.54) 8
                      2
            Now, let us convert a binary number with both integer and fractional parts to an equivalent octal number.


                                                                            Number Systems and Encoding Schemes  55
   52   53   54   55   56   57   58   59   60   61   62