We can use boolean algebra to implement the addition of binary numbers. A "half adder" adds two binary digits and produces a sum digit and a carry digit. Let x and y be the input bits to the half adder and let s be the sum bit and let c be the carry bit. Here is the truth table for the half adder. x y | c s -----+----- F F | F F F T | F T T F | F T T T | T F From this truth table we can write boolean expressions for the half adder. s = (!x && y) || (x && !y) = x xor y c = x && y A half adder can only add one-bit words. In order to add multi-bit words, we need to build a "full adder", which takes in a carry bit along with the usual two input bits. Let x and y be the usual input bits to the full adder and let r be the "carry in" bit. Let s be the output sum bit and let c be the output carry bit. Here is the truth table for the full adder. r x y | c s decimal --------+----- F F F | F F 0 F F T | F T 1 F T F | F T 1 F T T | T F 2 T F F | F T 1 T F T | T F 2 T T F | T F 2 T T T | T T 3 From this truth table we can write boolean expressions for the full adder. s = (!r && !x && y) ||(!r && x && !y) ||( r && !x && !y) ||( r && x && y) c = (!r && x && y) ||( r && !x && y) ||( r && x && !y) ||( r && x && y) But we would not want to build a real full adder using these expressions since these expressions can be simplified to use fewer operators. For a picture of the simplified full adder, see page BF-19 of http://cseweb.ucsd.edu/~gill/BWLectSite/Resources/C1U1BF.pdf Notice how, in the picture, a "full adder" is made up of two "half adders". Here are the boolean expressions for s and c from that picture. s = r xor (x xor y) c = (x && y) || (r && (x xor y)) Note that a xor b = (!a && b) || (a && !b) = (a || b) && !(a && b). So if we expand xor in terms of !, &&, ||, we get c = (x && y) || (r && (x xor y)) = (x && y) || (r && ((x || y) && !(x && y)) s = r xor (x xor y) = r xor ((x || y) && !(x && y)) = (r || ((x || y) && !(x && y))) && !(r && ((x || y) && !(x && y))) Notice that c simplified from 14 operators to 7 operators, and s simplified from 17 operators to 12 operators.