0
\$\begingroup\$

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.

\$\endgroup\$
2

3 Answers 3

2
\$\begingroup\$

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'
\$\endgroup\$
2
\$\begingroup\$

Although it is common to use the schematic symbol for xor to describe gates with arbitrary numbers of inputs whose output is true when an odd number of inputs are true, and xnor for one whose output is true when an even number of inputs are true, the notion that the terms "xor" and "xnor" should refer to such gates with more than two inputs is not quite universally accepted. Some implementations define xor as being true when some but not all of the inputs are true; others define it as being true only when exactly one input is true. Because there isn't a 100% consensus on what a three-input xor means, it's probably best to avoid using such gates in any context where the meaning wouldn't be apparent.

\$\endgroup\$
2
  • \$\begingroup\$ This changed how I look at things. I thought there was some mathematical sense behind the definition I have been given. However, I would still like to know how to manipulate the expression given into the shorter version built up by XOR, if possible. \$\endgroup\$
    – B. Lee
    Commented Feb 23, 2015 at 20:26
  • 1
    \$\begingroup\$ @B.Lee: Three inputs have eight combinations of high and low. Four of those combinations have an odd number of inputs high; the other four have an even number of inputs high. Think of the function of XOR in terms of even and odd counts, and it should be clear what's going on. \$\endgroup\$
    – supercat
    Commented Feb 23, 2015 at 20:44
1
\$\begingroup\$

Using High(H) and Lows (L) the for inputs of an XOR.

  • If Input 1 = H and Input 2 = L then Output = L
  • If Input 1 = L and Input 2 = H then Output = L
  • If Input 1 = H and Input 2 = H then Output = H
  • If Input 1 = L and Input 2 = L then Output = H
\$\endgroup\$
2
  • \$\begingroup\$ I understand this already. I don't believe this answers any of my questions. Besides 1 XOR 1 = 0, not 1. \$\endgroup\$
    – B. Lee
    Commented Feb 23, 2015 at 20:21
  • 1
    \$\begingroup\$ Noticed you had accidentally defined XNOR, not XOR. \$\endgroup\$
    – B. Lee
    Commented Feb 23, 2015 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.