Electronic – How to simplify ab + a’b’? Is there a gate for this

boolean-algebradigital-logic

I am simplifying the sum part of a full adder. The equation I get is:

$$x \cdot \overline y \cdot \overline {cin} + \overline x \cdot \overline y \cdot cin + x \cdot y \cdot cin + \overline x \cdot y \cdot \overline {cin}$$

How do I simplify this to get the two xor gates that make up the sum part of a full adder?

Best Answer

If you are trying to use the various laws of Boolean algebra to go from the equation you have to a pair of XOR gates, it is not too tricky, you just have to spot similarities.

Lets look at your equation, what can we do?

$$x \cdot \overline y \cdot \overline c + \overline x \cdot \overline y \cdot c + x \cdot y \cdot c + \overline x \cdot y \cdot \overline c$$

  1. Try taking out factors:

    Notice there are some \$c\$ terms in common:

    $$\begin{align} x \cdot \overline y \cdot \overline c + \overline x \cdot y \cdot \overline c &= (x \cdot \overline y + \overline x \cdot y) \cdot \overline c\\ \overline x \cdot \overline y \cdot c + x \cdot y \cdot c &= (\overline x \cdot \overline y + x \cdot y) \cdot c\\ \end{align}$$

    That would leave us with:

    $$(\overline x \cdot \overline y + x \cdot y) \cdot c + (x \cdot \overline y + \overline x \cdot y) \cdot \overline c$$

  2. Using the standard table of Boolean algebra functions, we can easily spot the XNOR and XOR gates:

$$(\overline x \cdot \overline y + x \cdot y) \cdot c + (x \cdot \overline y + \overline x \cdot y) \cdot \overline c = \overline{(x \oplus y)}\cdot c + (x \oplus y)\cdot\overline c$$

  1. Lets add a dummy variable to see things more clearly. Let \$d = (x \oplus y)\$. Then substitute it in to the above:

$$\overline{(x \oplus y)}\cdot c + (x \oplus y)\cdot\overline c = \overline d \cdot c + d \cdot \overline c$$

  1. Spot the XOR gate there?

$$\overline d \cdot c + d \cdot \overline c = d \oplus c$$

  1. Finally, lets plop back in \$d\$.

$$d \oplus c = (a \oplus b) \oplus c $$