Page 9 - Code Craft Computer-7
P. 9

Example 3. Convert (101.101)  to decimal number.
                                              2
                          Position          2          1          0                    –1         –2         –3
                                                                                        .
                          Face value        1          0          1          .          1          0          1
                          Weights          2 2        2 1        2 0                   2 –1       2 –2       2 –3


                                                                  0
                                                                                     –2
                                                                           –1
                                                         1
                                                2
                           (101.101)  = 1 × 2  + 0 × 2  + 1 × 2  + 1 × 2  + 0 × 2  + 1 × 2      –3
                                      2
                                        = 1 × 4 + 0 + 1 × 1 + ½ + 0 + 1/8
                                        = 4 + 1 + 0.5 + 0.125 = (5.625)
                                                                          10
                           (101.101)  = (5.625)
                                      2           10
                      Try It Out                                                                #Critical Thinking


                1.  Convert the binary number (1000.10)  into decimal number.
                                                          2










                2.  Convert decimal number (30)  into binary number.
                                                  10













            OPERATIONS ON BINARY NUMBERS

            Let’s learn the basic operations on binary numbers.
            Binary Addition

            Binary addition is similar to the addition of decimal numbers. When the value of addition exceeds
            the value 1, say 10 or 11, then 1 is carried over to the left of the current position. The rules for
            adding two binary digits are given below:

                       X            Y                X + Y                        1 1 1 1 1 0            Carry bits

                       0            0              0 + 0 = 0
                                                                                  1 0 1 1 1 1
                       0            1              0 + 1 = 1
                                                                                  + 1 0 1 1 1
                       1            0              1 + 0 = 1

                       1            1        1 + 1 = 10 (carry 1)              1 0 0 0 1 1 0


            For example, let us add the binary numbers (101111)  and (10111) .
                                                                      2              2
                                                                 9
   4   5   6   7   8   9   10   11   12   13   14