Level 7: Full Adder

Task

Build a Full Adder: 3 inputs, 2 outputs.

A full adder adds THREE bits: A, B, and CarryIn (carry from previous digit). Two outputs: Sum and CarryOut.

Solution

Sum is XOR of all three inputs: 1. Place first XOR: inputs A and B. 2. Feed its output into a second XOR along with CarryIn. 3. Second XOR output is Sum.

CarryOut is "majority vote": 1 if at least two of the three inputs are 1. 4. Build three ANDs for the three pairs: (A,B), (A,CarryIn), (B,CarryIn). 5. Combine their outputs via two ORs: first OR takes AND#1 and AND#2, second OR takes first OR output and AND#3. 6. Last OR output is CarryOut.