# Simplifying expressions containing boolean logic

I have an expression below:

$$A'B'C'D' + A'B'C'D + A'BC'D' + A'BC'D + ABCD$$

I want to simplify this. I've been using a program which gives the following simplified form:

$$ABCD + A'C'$$

I'm not entirely sure how it came to this. Here's how I've been trying it:

\begin{align}A'B'C'D' + A'B'C'D + A'BC'D' + A'BC'D + ABCD && \mathrm{Initial} \\ A'B'C'D' + ABCD + A'B'C'D + A'BC'D' + A'BC'D && \mathrm{Rearrange} \\ 0 + A'B'C'D + A'BC'D + A'BC'D && \mathrm{Cancel\ Opposite\ Terms} \\ 0 + A'C'D + A'BC'D && \mathrm{B\ and\ B'\ Cancel} \\ A'C'D + A'BC'D && \mathrm{End\ Result} \\ A'C'D(1 + B) && \mathrm{Potentially\ going\ further?}\end{align}

Have I made a mistake in here? Can the final step be done, and if so, what does it signify for the purpose of circuitry?

## 2 Answers

Yes, you cannot "Cancel Opposite Terms" the way that you've shown, consider studying DeMorgan's Law to see why. Instead, think about using the law of Boolean Distribution:

$$A^\prime B^\prime C^\prime D^\prime + A^\prime B^\prime C^\prime D + A^\prime B C^\prime D^\prime + A^\prime B C^\prime D + ABCD$$

$$= (A^\prime B^\prime C^\prime)( D^\prime + D) + (A^\prime B C^\prime)( D^\prime + D) + ABCD$$

$$= A^\prime B^\prime C^\prime + A^\prime B C^\prime + ABCD$$ $$= A^\prime C^\prime (B^\prime + B) + ABCD$$ $$= A^\prime C^\prime + ABCD$$

As required. This uses distribution, definition of complementation, and properties of the boolean product identity.

• Just so I don't make another question, is this correct? $A'B'C'D' + A'B'CD + ABC'D' + ABCD = (A'B')(CD+C'D') + (AB)(CD + C'D') = (A'B' + AB) = 1$? – gator Oct 23 '16 at 23:09
• No, that is not correct. Please look up DeMorgan's Law, and you'll see that $(CD)^\prime = C^\prime + D^\prime \neq C^\prime D^\prime$. – Larry B. Oct 24 '16 at 1:17

Yes, you made a mistake. The 'Cancel Opposite Terms' cancels $A'B'C'D'$ and $ABCD$, but these are not opposite .. the opposite of $ABCD$ would be $A'+B'+C'+D'$.

You also need to be careful with 'Cancelling':, e.g. if you had $A + A' + B$ you don't get $0 + B$ and thus $B$, but rather $1 + B$, and thus $1$

Also, the 4th term from line 2 has a $D'$, but on line 3 this has become $D$