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

Conversion of Decimal Fractions to Hexadecimal
        To convert fractional numbers in a decimal number system to hexadecimal, the steps are as follows:

        1.  Multiply the fractional part by 16.
        2.  Note the integer part after multiplication by 16.
        3.  Multiply only the fractional part obtained in step 1 by 16.
        4.   In the case of terminating fractions, repeat steps 2 and 3 till the fractional part becomes zero. However, in the case
            of non-terminating fractions, repeat steps 2 and 3 up to the recurring integer part. Examples 30 and 31 illustrate
            the conversion of terminating and non-terminating fractions.
        5.  The integer part, from top to bottom forms the hexadecimal number.

        Example 30: Convert (0.25) to its equivalent hexadecimal number.
                                 10
                                        Integer part
          0.25 × 16   =  4.0                4
          0.0 × 16     =  0                 0
               = (0.40)
                           16
        Example 31: Convert (0.65)  to its equivalent hexadecimal number.
                                 10
                                       Fraction part     Integer part
          0.65 × 16  =  10.4               0.4            10 → A
          0.4 × 16    =  6.4               0.4                6
          0.4 × 16    =  6.4               0.4                6
          0.4 × 16    =  6.4               0.4                6
          (0.65)  = (0.A6) 16
                10
                                      (0.65) = (0.A666…) = (0.A6) 8
                                            10
                                                        8
                                                   ↓
                                             Recurring digit (6)


        Example 32:  Convert  (705.81)  to  its  equivalent  hexadecimal  number,  accurate  to  three  places  after  the  radix
                                    10
        point.
             16  705        Remainder
             16   44            1

             16    2           12 → C     (2C1) 16
                   0            2

                                       Fraction part     Integer part

          0.81 × 16  =  12.96              0.96            12 → C
          0.96 × 16  =  15.36              0.36            15 → F         (CF5) 16

          0.36 × 16  =  5.76               0.76                 5
          (705.81)  = (2C1.CF5) 16
                  10



                 Find hexadecimal representation of (0.25) , (0.75) and (0.125) .
                                                         10
                                                                    10
                                                  10



          54   Touchpad Computer Science-XI
   51   52   53   54   55   56   57   58   59   60   61