Page 11 - Computer - 7
P. 11

BINARY SUBTRACTION

          The basic rules for binary subtraction are listed in the table below:

                     Case                       Input                       Sum                       Carry

                       1                        0 – 0                         0                         0

                       2                        1 – 0                         1                         0


                       3                        1 – 1                         0                         0

                       4                        0 – 1                         1                         *1

          * To subtract a higher digit from a lower digit, i.e., 1 from 0, one has to borrow from the left column.

          Example 1                           Example 2                                Example 3

          Compute (1110)  + (101)             Compute (10101)  + (1010)              Compute (11101)  + (10011)
                           2        2                           2          2                           2           2
                           0 10                          0 10 0 10                                    0  10
                      1 1  1  0                         1  0  1  0  1                          1  1  1  0  1
                       – 1 0 1                          – 1  0  1  1                         – 1  0  0  1  1
                      1 0 0 1                             1  0  1  1                           0  1  0  1  0



          BINARY MULTIPLICATION
          The Binary multiplication is similar to the decimal multiplication. It is simpler than decimal multiplication
          because only 0 and 1 are involved. The basic rules for binary multiplication are listed in the table below:


                          Case                               Input                          Multiplication

                           1                                 0 × 0                                 0


                           2                                 1 × 0                                 0

                           3                                 0 × 1                                 0

                           4                                 1 × 1                                 1


          Example 1                           Example 2                                 Example 3
          Compute (110)  × (11)               Compute (1101)  × (10)                 Compute (1001)  × (101)
                          2      2                             2       2                               2       2
                                                                                            1 0 0 1
                      1 1 0                              1 1 0 1                            × 1 0 1
                      × 1 1                                × 1 0                            1 0 0 1

                      1 1 0                              0 0 0 0                           0 0 0 0 ×
                    1 1 0 ×                            1 1 0 1 ×                         1 0 0 1 × ×
                  1 0 0 1 0                            1 1 0 1 0                         1 0 1 1 0 1




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