1
\$\begingroup\$

Given the truth table for a 3-input XOR, how come the output is 1 when all inputs are 1? This doesn't logically extend from a 2-input XOR where output is 0 when all inputs are 1. Is there a way to understand this intuitively, or do we need kmaps etc?

xor
(source: electronicshub.org)

\$\endgroup\$
5
  • 2
    \$\begingroup\$ Related electronics.stackexchange.com/questions/93713/… \$\endgroup\$
    – Tyler
    Commented Jan 16, 2017 at 16:22
  • 1
    \$\begingroup\$ Always remember XOR is an odd parity detector, For example an XOR with N inputs will output 1 if only odd number of inputs is asserted \$\endgroup\$
    – Elbehery
    Commented Jan 16, 2017 at 16:31
  • 1
    \$\begingroup\$ @Elbehery It depends on the definition. And apparently it is ambiguous as the answer in the link above is describing. \$\endgroup\$
    – Eugene Sh.
    Commented Jan 16, 2017 at 17:00
  • 1
    \$\begingroup\$ There are two definitions for XOR: just one injput is high, or a odd number of inputs is high. For 2 inputs these definitions coincide, for more than two inputs the world seems to be divide 50-50. \$\endgroup\$ Commented Jan 16, 2017 at 18:03
  • \$\begingroup\$ A niche little trick to remember this can be odd number of ones give the output one. This trick works with any number of inputs! \$\endgroup\$
    – ADITYA DAS
    Commented Jan 28 at 9:21

2 Answers 2

4
\$\begingroup\$

It may help to break it down: first do \$ A \oplus B = 1 \oplus 1 = 0 \$. Then we have \$ 0 \oplus C = 0 \oplus 1 = 1 \$.

\$\endgroup\$
1
  • \$\begingroup\$ Keep in mind that this is not a 3-input XOR, it is a cascade of two 2-input XORs. They are not necessarily the same. \$\endgroup\$ Commented Jul 4, 2021 at 12:49
4
\$\begingroup\$

If you treat inputs as the sign of a number, where the "0" input corresponds to a positive sign, and a "1" corresponds to a negative sign, then the XOR function operates as a multiplier.
And if you reverse the logical assignment (logic "0" corresponds to -ve sign, and logic "1" corresponds to a +ve sign), that works too.
But two-input is XNOR, three-input XOR, 4-input XNOR.... I have used a two-input XOR gate as a multiplying mixer for two square-wave inputs of differing frequencies. The output contains similar spectral components as an analog type multiplying mixer: multiply input symbol signs using XOR It is strange to me that the accepted symbol of XOR seems to involve addition, when its more fundamental operation is multiplication in my twisted mind.

\$\endgroup\$

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.