Multiplying out negated terms in boolean algebra?
Question
I'm just learning boolean algebra at the moment. I read that for XOR we can rearrange the expression
(A + B) . ¬(A + B)
= A.¬A + A.¬B + B.¬A + B.¬B
= A.¬B + B.¬A
I can understand this but I'm unsure how I would proceed multiplying out an expression like
- (A + B) . (¬A + ¬B).
If I just try and naively multiply out all the terms that will bring me to the same result as XOR but the truth table is different. What are the rules on multiplying out negated terms?
Solution
Your first expression isn't an xor, try making this substitution:
Z = A+B
OTHER TIPS
You can throw this kinda thing at Wolfram Alpha. Here's what I did:
http://www.wolframalpha.com/input/?i=truth+table+(a+or+b)+and+(not+a+or+not+b)
Please click on the link to view the results! Does that truth table look like what you thought it should, or not?
You think the truth table is different?
Try evaluating it yourself.
You need DeMorgan's Law
Answers here are not clear to me. I believe there's a typo in how you typed #1. It is a contradiction:
(A + B) * -(A + B)
(A + B) * -A * -B
-A * -B * A + -A * -B * B
0
If #1 were (A + B) * (-A + -B)
instead:
(A + B) * (-A + -B)
-A * (A + B) + -B * (A + B)
-A * A + -A * B + -B * A + -B * B
-A * B + -B * A
That's how you distribute AND over OR.