Page 186 -
P. 186

243_MasterPieces_04a.qxd  4/18/03  7:05 PM  Page 158





           158    Masterpiece 4 • PneumADDic II


                      Binary addition is similar to decimal addition in that you start at the ones place, and
                  work your way higher places carrying as needed, until you run out of numbers to add.
                  For example, we want to add decimal 5 to decimal 7 as described in Figure 1.6

                  Figure 1.6 Binary Addition

                  Binary    Decimal
                    101       (5)
                  +111        (7)
                  ----------
                  Binary    Decimal     Explanation
                   111                  Carries
                    101       (5)       Value 1
                  + 111       (7)       Value 2

                  ----------
                    1100 = (8 * 1 + 4 * 1 + 2 * 0 + 1 * 0 = 12)

                      In each column, you need to be able to add three binary digits (often referred to as
                  bits); a bit from Value 1, a bit from Value 2, and the Carry from the previous column.Table
                  1.2 shows all possible combinations of the three bits and the Sum and Carry.You can use
                  Table 1.2 to perform the binary addition for each binary place column in Figure 1.4

                  Table 1.2 Computing the Sum and the Carry

                  Inputs                                     Outputs
                  Carry       Value 1      Value 2           Carry          Sum

                  0           0            0                 0              0
                  0           0            1                 0              1
                  0           1            0                 0              1
                  0           1            1                 1              0
                  1           0            0                 0              1
                  1           0            1                 1              0
                  1           1            0                 1              0
                  1           1            1                 1              1


                  Boolean Logic

                  A British mathematician named George Boole invented a branch of mathematics which
                  became known as Boolean logic. Boolean logic deals with two valued number systems
                  (binary), and defines a simple set of rules of Boolean computation. Boole defined three
   181   182   183   184   185   186   187   188   189   190   191