Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Is there any way to simplify a combination of XOR and XNOR gates in the following expression? I have tried multiple boolean theorems and I have not been able to simplify this any further:

The simplified version is XOR(A,B)*XNOR(C,D) + XOR(C,D)*XNOR(A,B)

The actual expression is: (A'B + AB')(CD + C'D') + (AB + A'B')(C'D + CD')

According to my lab, this expression can be simplified, but I don't know where to start.

I guess you could look at each element, such as (A'B + AB') as a single variable, such as X and then the equation would be XY' + X'Y, but I still don't see how to simplify that.

share|improve this question

3 Answers 3

up vote 3 down vote accepted

You're on the right track. Note that $X\bar Y + \bar X Y$ is exactly $X\oplus Y$ (where $\oplus$ is XOR), so you can simplify to $$ (A\oplus B) \oplus (C\oplus D)$$ Since $\oplus$ is associative and commutative, this simplifies further to $$ A\oplus B\oplus C\oplus D $$ which is particularly nice because it's a linear function of the inputs in the associated Boolean ring (whose multiplication is conjunction and addition is $\oplus$).

share|improve this answer
@miracle173: Good catch. I have no idea where I got the idea that $Y$ would be $\overline{C\oplus D}$ rather than just $C\oplus D$. –  Henning Makholm Sep 20 '13 at 21:43

The definition (xor, xnor) of XOR(A,B)is A'B + AB' and of XNOR(C,D) is CD+C'D'. So XOR(A,B)*XNOR(C,D) + XOR(C,D)*XNOR(A,B) is a direct translation of (A'B + AB')(CD + C'D') + (AB + A'B')(C'D + CD').

share|improve this answer

In plain boolean algebra: XOR = (a || b) && !(a && b)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.