Question

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?

Was it helpful?

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:

  1. (A + B) * -(A + B)
  2. (A + B) * -A * -B
  3. -A * -B * A + -A * -B * B
  4. 0

If #1 were (A + B) * (-A + -B) instead:

  1. (A + B) * (-A + -B)
  2. -A * (A + B) + -B * (A + B)
  3. -A * A + -A * B + -B * A + -B * B
  4. -A * B + -B * A

That's how you distribute AND over OR.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top