Definition of XOR, and how to remember its expansion in disjunctive normal form for N variables

boolean-algebra

So the following boolean expression:

a'b'c + a'bc' + ab'c' + abc

Can be simplified to:

a XOR b XOR c

By the definition of XOR: XOR = 1 iff an odd number of ones from each term.


What I wonder is:

  • Have I understood the definition of XOR correctly?

  • How come that is the definition? Intuitive proof?

My intuition tells me XOR should only be true if and only if there is a single term with the value 1. i.e. A XOR B XOR C iff A'B'C+A'BC'+AB'C'.

  • More importantly, can the original expression be simplified in a step-by-step manner?

Personally, I feel like I would easily forget that the term abc is included in XOR for 3 variables. I'm not having trouble spotting XOR in 2 variables, and I haven't really worked with more than 3.

Best Answer

For 2 input we got:

a XOR b = a'b + ab'

For 3 input it's:

a XOR b XOR c = (a XOR b) XOR c = 
(ab' + a'b) XOR c = 
(ab'+a'b)'c + (ab'+a'b)c' =
(a + b')(a' + b)c + ab'c'+ a'bc' = 
aa'c + abc + b'a'c + b'bc + ab'c' + a'bc' =
abc + b'a'c + ab'c' + a'bc'
Related Topic