# Simplify the boolean function $$Z=A\bar B \bar{C_i} + \bar A B \bar{C_i} + \bar A\bar B {C_i} + A B {C_i}$$

I want to simplify the following boolean function:

$$Z=A\bar B \bar{C_i} + \bar A B \bar{C_i} + \bar A\bar B {C_i} + A B {C_i}$$

Here's my attempt:

\begin{align} Z &= A\bar B \bar{C_i} + \bar A B \bar{C_i} + \bar A\bar B {C_i} + A B {C_i} \\ & = \bar{C_i}(A \bar B + \bar A B) + C_i(\bar A \bar B + AB) \\ & = \bar C_i(A \oplus B) + C_i(A \equiv B) \end{align}

I thought this was the end of it but in my textbook it continues and has: \begin{align} Z &= A\bar B \bar{C_i} + \bar A B \bar{C_i} + \bar A\bar B {C_i} + A B {C_i} \\ & = \bar{C_i}(A \bar B + \bar A B) + C_i(\bar A \bar B + AB) \\ & = \bar C_i(A \oplus B) + C_i(A \equiv B) \\ & = A \oplus B \oplus C_i \\ & = A \equiv B \equiv C_i \end{align}

I'm confused about what happened between the third and fourth step. What boolean algebra rules are being used here?

• You need a double dollar sign for your title. – DKNguyen Sep 2 '20 at 19:34
• $$A \equiv B$$ is the same as NOT $${(A \oplus B)}$$ (sorry not very good at formulas) – jcaron Sep 2 '20 at 21:05
• @jcaron Yes but I'm trying to figure out why $$\bar C_i(A \oplus B) + C_i(A \equiv B)=A \oplus B \oplus C_i$$. – Ski Mask Sep 3 '20 at 12:02
• By $X\equiv Y$, what do you mean exactly? I've never seen this notation so far. – edmz Sep 4 '20 at 19:10
• Seems like $$A\equiv B$$ is the same as $$\overline{(A\oplus B)}$$. In that case, \begin{align} Z&=\overline{C_i} (A \oplus B) + C_i (A\equiv B)\\ &=\overline{C_i} (A \oplus B) + C_i\overline{(A \oplus B)} \\ &= C_i \oplus (A\oplus B)\\ &=A\oplus B\oplus C_i \end{align} – cjferes Sep 4 '20 at 21:50

When in doubt about booleans, just build a truth table.

Truth tables for XOR ($$\\oplus\$$):

   | 0 | 1
---+---+---
0 | 0 | 1
---+---+---
1 | 1 | 0


For "is equal to" ($$\\equiv\$$):

   | 0 | 1
---+---+---
0 | 1 | 0
---+---+---
1 | 0 | 1


As you can see $$\A \equiv B\$$ gives just the opposite result of $$\A \oplus B\$$ (the result is 1 for the first when it is 0 for the second, and vice-versa). This means that:

$$A \equiv B = \overline{A \oplus B}$$

You used several times the identity $$X\overline{Y} + \overline{X}Y = X \oplus Y$$

This means: If (X is true AND Y is false) OR (if X is false and Y is true) is the same as either X or Y is true, but not both, which is quite straightforward.

So now you get to this equation:

$$\overline{C_i}(A \oplus B) + C_i(A \equiv B) \\$$

Since $$\A \equiv B\$$ can be written as $$\\overline{A \oplus B}\$$, you can rewrite it to:

$$\overline{C_i}(A \oplus B) + C_i(\overline{A \oplus B}) \\$$

Which is a form of $$\X\overline{Y} + \overline{X}Y\$$, with $$\X = C_i\$$ and $$\Y = A \oplus B\$$.

So it can then be rewritten to:

$$C_i \oplus (A \oplus B)$$

As all these boolean operators are commutative, this be be rewritten as:

$$A \oplus B \oplus C_i$$

Observe that
\begin{align}\overline{\overline{A} \cdot\overline{B} + A\cdot B} = \overline{(\overline{A}\cdot\overline{B})}\cdot\overline{(A \cdot B)} = (A + B)\cdot(\overline{A}+\overline{B}) = A \cdot\overline{B} + \overline{A}\cdot B \end{align}

Hence

\begin{align} Z&=\overline{C_i} (A \oplus B) + C_i (A\equiv B)\\ &=\overline{C_i} (A \oplus B) + C_i\overline{(A \oplus B)} \\ &= C_i \oplus (A\oplus B)\\ &=A\oplus B\oplus C_i \end{align}

• Ah I see. I made the mistake of taking $$A \equiv B = A \oplus B$$ and not $$\lnot{(A \oplus B)}$$ – Ski Mask Sep 7 '20 at 11:18

First, plus is an unusual operator for bool equations Wikipedia. I assumed you referencing a OR

With this assumtion I came to the result: no further reduction possible. For This I used a Karnaugh map

https://en.wikipedia.org/wiki/Karnaugh_map

• Leibniz used + for inclusive OR and Boole used it too, so it's been around for over 300 years. Nowadays, it's more usual to use + for OR and ⊕ for XOR because it's far more readable. See discussion here. Plus, there's far more to reduction than Karnaugh Maps, e.g. De Morgan's Laws. Don't believe everything you read on Wikipedia. – tim Sep 7 '20 at 12:30
• I only quote wikipedia if it states things I know to be correct an are also in my books... I work in electronics for 25 years now, and never saw a plus for OR from any professional... – schnedan Sep 7 '20 at 12:38
• also as you can see in the formula als well as in the Karnaugh_map there are always 2 of 3 elements different in any case and there is no 2 Element term which can be reused without modification (like invert) in an other therm. So if there is a further reduction I like to learn how, but I don't see any – schnedan Sep 7 '20 at 12:47
• Things like De Morgan's Laws, to my knowledge are good for 5 or more variables where Karnaugh_maps start to be of no use. But if you can apply a simple scheme like Karnaugh_map its a valid measure to do so. – schnedan Sep 7 '20 at 12:54
• As you can see, a 4-input OR gate with 3 NOT gates had been reduced to a 3-input XOR gate. The + and ⊕ signs are standard teaching in schools, colleges and universities around the world. Are you trolling? – tim Sep 7 '20 at 12:57