I have solved full adder and it gives me carry:

$A$$.$$Cin$+$B$$.$$Cin$+$A$$.$$B$

But in some books I found that carry is written as:

$A$$.$$B$$+$$($$A$$\bigoplus$$B$$)$$.$$Cin$

How to derive second equation from first?

• Have you tried Karnaugh mapping? – Brian Drummond Sep 16 '16 at 12:21
• Yes, I have tried Karnaugh mapping – Abhishek Sep 16 '16 at 13:08

First off, lets make an observation. The following is true (if you don't believe me, I'll prove it later):

$A + B = AB + \bar AB + A \bar B$

Now, by the definition of XOR we have:

$A \oplus B = \bar AB + A \bar B$

Combining the two expressions we get:

$A + B = AB + A \oplus B$

With that, lets begin:

AB+AC+BC = AB + C(A+B)        // Factor out C
= AB + C(AB + A⨁B)  // Substitute the above expression
= AB + CAB + C(A⨁B) // Factor out AB
= AB + C(A⨁B)       // Invoke the absorption rule to get rid of CAB


Voila, that's what we were looking for. I don't claim that is the best way to do it, but it seems to work well enough.

Now, I'm going to show $A + B = AB + \bar AB + A \bar B$ using sweet, pure Boolean logic.

$A+B = A(\bar B + B) + B(\bar A + A) = AB + \bar AB + A \bar B$

Let's just call $C_{in} = C$, because it's easier to type and read. You want to show that:

$$A\cdot B + A\cdot C + B\cdot C = A\cdot B + \left(A \oplus B\right)\cdot C$$

Let's take the right side and show how it goes:

\begin{align*} A\cdot B &+ \left(A \oplus B\right)\cdot C \\ A\cdot B &+ \left(A\cdot \bar{B} + \bar{A}\cdot B\right)\cdot C \\ A\cdot B &+ A\cdot \bar{B}\cdot C + \bar{A}\cdot B\cdot C \\ A\cdot B\cdot C + A\cdot B\cdot \bar{C} &+ A\cdot \bar{B}\cdot C + \bar{A}\cdot B\cdot C \end{align*}

I think you can see how that expansion went, so far. It's now the left-most term that is interesting. We are allowed to replicate it as many times as we want, as it won't change the result. So the following expressions are exactly the same expression as the last one shown above:

$$A\cdot B\cdot C + A\cdot B\cdot \bar{C} + A\cdot \bar{B}\cdot C + \bar{A}\cdot B\cdot C \\ A\cdot B\cdot C + A\cdot B\cdot C + A\cdot B\cdot C + A\cdot B\cdot \bar{C} + A\cdot \bar{B}\cdot C + \bar{A}\cdot B\cdot C \\ \left(A\cdot B\cdot C + A\cdot B\cdot \bar{C}\right) + \left(A\cdot B\cdot C + A\cdot \bar{B}\cdot C\right) + \left(A\cdot B\cdot C + \bar{A}\cdot B\cdot C\right) \\ \left(A\cdot B\right) + \left(A\cdot C\right) + \left(B\cdot C\right) \\ A\cdot B + A\cdot C + B\cdot C$$

That should be convincing, I hope.