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

Fractional Part   Integer part
            0.25 × 2 = 0.50         0.50             0
                                                             (.01)
            0.50 × 2 = 1.00         0.0              1           2
            (101.25)  = (1100101.01) 2
                   10


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

        Binary to Decimal Conversion
        To convert a binary fraction to decimal, we use place values (base 2) and follow the following steps:
        1.  Write the binary 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.
        Next, we convert the binary numbers in examples 18, 19, 20, 21 and 22 to their equivalent decimal numbers.

        Example 18: (0.01)  to decimal
                         2
          Face Value       0    .   0    1
                                      –1
          Place value      2 0      2   2 –2
                         –1
            = 0 × 2  + 0 × 2  + 1 × 2 –2
                  0
            = 0 +   1
                 2 2
            = 0 +   1   = 0.25
                  4
            Therefore (0.01)  = (0.25)
                          2        10
        Example 19: (0.011)  to decimal
                          2
          Face value       0    .   0    1    1

                                          –2
                                      –1
          Place value      2 0      2   2   2  –3
                  0
                         –1
                                 –2
            = 0 × 2  + 0 × 2  + 1 × 2  + 1 × 2 –3
            = 0 +   1   +   1
                 2 2  2 3
            =  1   +   1   = (0.375)
              4    8         10
        Example 20: (0.010)  to decimal
                          2
        Note that trailing zeros in the fractional part do not affect its value. Hence, we write: (0.010)
                                                                                          2
            = (0.01) 2

            Face value       0     .    0     1
                                              –2
            Place value      2 0       2 –1  2
                  –1
            = 0 × 2  + 1 × 2 –2
            = 0 +   1
                  4
            = (0.25) 10





          50   Touchpad Computer Science-XI
   47   48   49   50   51   52   53   54   55   56   57