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$$
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$$
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$$
$$\overline{(x \oplus y)}\cdot c + (x \oplus y)\cdot\overline c = \overline d \cdot c + d \cdot \overline c$$
$$\overline d \cdot c + d \cdot \overline c = d \oplus c$$
$$d \oplus c = (a \oplus b) \oplus c $$