0

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.

B. Lee
  • 243
  • 2
  • 6
  • 13
  • 1
    See also [How is an XOR with more than 2 inputs supposed to work?](http://electronics.stackexchange.com/q/93713/25328) (duplicate?) – Tut Feb 23 '15 at 20:31
  • [SN74LVC1G386 Single 3-Input Positive-XOR Gate](http://www.ti.com/lit/ds/symlink/sn74lvc1g386.pdf) – Tut Feb 23 '15 at 21:08

3 Answers3

2

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.

supercat
  • 45,939
  • 2
  • 84
  • 143
  • 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. – B. Lee Feb 23 '15 at 20:26
  • 1
    @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. – supercat Feb 23 '15 at 20:44
2

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'
Dave Tweed
  • 168,369
  • 17
  • 228
  • 393
Alexxx
  • 909
  • 5
  • 11
1

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
Dave Tweed
  • 168,369
  • 17
  • 228
  • 393
user66377
  • 570
  • 2
  • 11