Electrical – Is XOR equal to XNOR when odd number of inputs are considered

digital-logiclogic-gates

I was attempting a question which said that you can convert a Full Adder into a Full Subtractor with using just one inverter. Later I researched on this XOR and found that that for even no. of inputs it is the invert of XNOR and for odd number of inputs it is equal to XNOR. Is it true?
Also Can we say that the XOR gate gives true or 1 value only when there are odd numbers of 1 in the input.

Best Answer

The behavior of a a XOR gate with multiple inputs needs to be defined, it is not just a simple extension of the two-input XOR gate. As always with definitions it is possible to have different, even contradicting, ones.

In my opinion this definition seems to be useful:

For multiple arguments, XOR is defined to be true if an odd number of its arguments are true, and false otherwise. This definition is quite common in computer science, where XOR is usually thought of as addition modulo 2. In this context, it arises in polynomial algebra modulo 2, arithmetic circuits with a full adder, and in parity generating or checking. While this means that the multiargument "XOR" can no longer be thought of as "the exclusive OR" operation, this form is rarely used in mathematical logic and so does not cause very much confusion.

The XNOR would just be the inverse of the XOR.