# Electronic – Formulas for Carry out in a Full Adder

Given a full adder with inputs $$A, B \text{ and } C_{in}$$
The formulas for the outputs are $$S = A \oplus B \oplus C_{in} \text{ , Where } \oplus \text{means XOR}$$ and $$C_{out} = AB + AC_{in} + BC_{in}$$

But when a Full Adder is created by combining two half-adders, the obtained equation for carry out is $$C_{out} = AB + (A \oplus B)C_{in}$$

The two expressions have equivalent Truth Tables, but the reason for their equality is not obvious.

Start off with the second expression $$C_{out} = A B + (A \oplus B)C_{in}$$ Using the expansion, $$A \oplus B = \bar AB + A \bar B \quad \text{ for XOR}$$ The right hand side becomes $$AB + \bar A B C_{in} + A \bar B C_{in} \tag{1}$$ Taking B common between the forst two terms, we get (Property of Boolean Algebra) $$B(A + \bar AC_{in})$$ Using the fact that addition distributes over multiplication (In boolean Algebra) $$A + BC = (A + B)(A + C) \tag{2}$$ Hence the term becomes $$B((A + \bar A)(A + C_{in})) = AB + BC_{in}$$ Plugging this back into (1) and reusing property (2) with $$B+ \bar B C_{in}$$ We get the alternate form $$AB + BC_{in} + C_{in} \tag {3}A$$ Intuitive Approach
In boolean form this would be, $$AB + (A+B)C_{in}$$ Which is the same as (3)