<<< Arithmetic Based on Logical Functions     Index     Half Adder Discussion >>>

2. Adding Binary Numbers


  • How, then, could we add two binary numbers?

  • For two input bits there are four possible combinations of inputs.

  • These four possibilities, and the resulting sums, are:

         0 + 0 =  0
         0 + 1 =  1
         1 + 0 =  1
         1 + 1 = 10
    
  • The last line indicates that we have a carry output.

  •  

    INPUTS OUTPUTS
    A B CARRY SUM
    0 0 0 0
    0 1 0 1
    1 0 0 1
    1 1 1 0

  • Therefore, we can transform our results into a truth table, shown on the right.

  • Suddenly, this looks familiar:

    • The carry output is a simple AND function.

    • The sum is an XOR.

  •   half adder circuit

<<< Arithmetic Based on Logical Functions     Index     Half Adder Discussion >>>