Page 58 - Computer Science Class 11 With Functions
P. 58

Conversion of Octal Numbers to Binary

        To convert an octal number to binary, for each octal digit, write its 3-bit binary representation.
        Example 38: Convert (0.54) to binary
                                 8
                  0  .     5         4
                           ↓         ↓
                          101       100
            = (0.101100) 2
        Example 39: Convert (6.2)  to a binary number.
                               8
              6  .          2
                  ↓        ↓
                 110      010
            = (110.010) 2
        Example 40: Convert (743.456)  to a binary number.
                                    8
                  7        4         3         .        4        5         6
                  ↓        ↓         ↓                  ↓        ↓        ↓

                 111      100       011                100      101      110
            = (111100011.100101110) 2



                 Find binary representation of (6.2) (4.56) and (6.2) .
                                                  8
                                            8,

                                                          8
        Conversion of Binary Numbers to Hexadecimal
        To convert a fractional binary number to its equivalent hexadecimal number, form groups of four bits, starting from left
        to right after the radix point. If the number of bits is not a multiple of four, append the required number of 0's on the
        right end. Finally, replace each group of four bits with an equivalent hexadecimal digit.
        Example 41: Convert (.11011) to its equivalent hexadecimal number.
                                   2
                  three 0s added

            1 1 0    1 1  0  0  0

               D         8
            (.11011)  = (.D8) 16
                    2
        Example 42: Convert (10110.10)  to its equivalent hexadecimal number.
                                     2
            three 0s added                          two 0s added
                            00010110   .  1  0  0  0


                              1   6           8
             (10110.10)  = (16.8)
                       2          16


                 Find hexadecimal representation of (110.01) , (100.101110) , and (110.011) .
                                                    2            2           2






          56   Touchpad Computer Science-XI
   53   54   55   56   57   58   59   60   61   62   63