Search code examples
booleanalgebra

Multiplying out negated terms in boolean algebra?


I'm just learning boolean algebra at the moment. I read that for XOR we can rearrange the expression

  1. (A + B) . ¬(A + B)

  2. = A.¬A + A.¬B + B.¬A + B.¬B

  3. = 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