How to simplify Boolean expression with XOR?
27,641
Solution 1
If you consider that A XOR B is equivalent to (A AND ~B) OR (~A AND B) then the rest should be easy.
Solution 2
Write a xor b as:
a != b
or:
!(!a || b) && !(a || !b)
Author by
Admin
Updated on June 07, 2020Comments
-
Admin over 2 yearsI want to simplify a boolean Expression.
The Expression is something like thisX1 xor (X2 || X3 && X4 || x5)How do I simplify this expression using rules of Boolean Algebra.
Moreover I want to convert the above boolean expression to a CNF form , so how do I do it.
-
Admin over 10 years:-I don't get u what will be the simplification in the above case bcoz in my case A is X1 and B is (X2 || X3 && X4 || x5) so how will this be done can u please explain in detail with a example. -
Draken over 6 yearsYourAisX1and yourBis(X2 || X3 && X4 || x5), can you try and work it out from that? Just plug it into the formula @PaulR has provided, simplify and you're good to go -
Paul R over 6 years@Draken: I sincerely hope that the OP is not still struggling with this 4 years after he asked the question! ;-) -
Draken over 6 yearsTrue @PaulR, I was editing an answer from someone else and hadn't looked at the date of the question. Thought it was a new one, ah well :) -
Paul R over 6 years@Draken: yes, I'm not sure why someone decided to add another answer at this late stage - probably just trying to build up some rep.