I've been trying to simplify the
Boolean expression: A ^ B * C
for some time now. I'm able to first simplify it down to: A * ~B + ~A * B * C
but after that I can't seem to simplify it further. Using an online simplifies, it says that it simplifies to (A + B) * (A + C) * (~A + ~B)
but why is that? And what laws are used to simplify it to that?
It depends on the precedence of the operators. Normally AND comes before XOR and it is A XOR (B AND C)
. Some programming languages evaluate expressions strictly from left to right when not using parentheses, resulting in (A XOR B) AND C
, assuming you are using ^
for XOR
and *
for AND
.
Your simplification seems to be going for the latter variant but normally in boolean algebra you'd evaluate the AND first:
A * ~(B*C) + ~A * B * C
= A * (~B + ~C) + ~A * B * C
= A * ~B + A * ~C + ~A * B * C
It's been a while that I've worked with boolean expressions like this, so I don't know if there can be made any further simplifications (or even if mine are correct).
And are you sure, you wrote down the result of the online simplifier correctly? Because the term (A + B) * (~A * ~B)
evaluates to A * ~A * ~B + B * ~A * ~B = 0 + 0
and therefore the whole term evaluates to false
. This is all assuming that there is the following precedence of operators: NOT > AND > OR. If the last term in their solution is (~A + ~B)
it would make more sense and evaluate to your term A * ~B + ~A * B * C
, it just is its conjunctive normal form.