Page 10 - Computer - 7
P. 10

Example 2:   To convert (100101)  into decimal number.
                                             2
                        (100101)       = 1 × 2  + 0 × 2  + 0 × 2  + 1 × 2  + 0 × 2  + 1 × 2 0
                                                              3
                                                                       2
                                              5
                                                      4
                                                                               1
                                  2
                                       = 1 × 32 + 0 × 16 + 0 × 8 + 1 × 4 + 0 × 2 + 1 × 1
                                       = 32 + 0 + 0 + 4 + 0 + 1
                                       = 37
                        Thus, (100101)  = (37)
                                        2       10
                 Knowledge Discovery                                                               Subject Enrichment

               If the last digit of a binary number is 1, the number is odd; if it’s 0, the number is even. For example, the
               number 101 in binary system is an odd number equal to number 5 in decimal system, while the number
               1010 in binary system is an even number equal to number 10 in decimal system.


                   Try This
                                                                                                   Computational Skills
             Convert the numbers given below as directed:
             (a) 10111 into decimal number system                      _______________
             (b) 137 into binary number system                         _______________
             (c) 100010 into decimal number system                     _______________
             (d) 78 into binary number system                          _______________


          Binary Arithmetic
          The arithmetic of binary numbers involves the addition, subtraction, multiplication, and division
          of binary numbers. Binary arithmetic operations usually start from the rightmost digit.

          BINARY ADDITION
          The basic rules for binary addition are listed in the table below:

                     Case                       Input                      Sum                        Carry

                       1                        0 + 0                        0                          0

                       2                        0 + 1                        1                          0

                       3                        1 + 0                        1                          0
                       4                        1 + 1                        0                         *1

          *Carry of 1 is shifted to the next column to the left of the current digit.

          Example 1                           Example 2                            Example 3

          Compute (101)  + (100)              Compute (1011)  + (1101)            Compute (11111)  + (1001)
                          2        2                           2         2                           2         2
                                                        1 1 1     Carry                   1 1 1 1     Carry
                   1 0 1                               1 0 1 1                           1 1 1 1 1
                 + 1 0 0                             + 1 1 0 1                           + 1 0 0 1
                 1 0 0 1                             1 1 0 0 0                          1 0 1 0 0 0



                8
   5   6   7   8   9   10   11   12   13   14   15