02-09-2017 10:40 AM
I have a question about XNOR gate for multiple inputs. Are these detections related to two expressions correct?
1. "The output of an XNOR gate is HIGH only if the number of LOW inputs is even." (True)
2. "The output of an XNOR gate is HIGH only if the number of HIGH inputs is even." (Not Certain)
02-09-2017 11:13 AM
02-09-2017 11:13 AM
02-09-2017 05:03 PM - edited 02-09-2017 05:03 PM
I think you both got it wrong. The output is high if the number of HIGH inputs is even. Low inputs may be even or odd depending on the number of inputs. For example, a 3-input XNOR would be high when two inputs are HIGH and one low. Any size XNOR with all inputs LOW will have a HIGH output (0 is an even number of HIGH inputs). As Balkris pointed out this is the inverse of an XOR gate. Note that this means inverting the OUTPUT of the XOR gate. If you have an XOR gate with an even number of inputs and invert all the INPUTS, the output will still be an XOR function!
02-09-2017 07:34 PM
For the most common definition, it is the second diagram. i.e. you take a 3-input XOR gate and invert its output. Note that there is a different definition, although it's not often used for digital logic gates. In that definition an N-input XOR gate goes high when exactly one of its inputs is high, regardless of the number of inputs. For the 2-input gate, the two definitions give the same output. For a 3-input gate, the XOR definition most commonly used for digital logic also goes high when all three inputs are high. This can also be called an odd parity gate as noted in this reference:
For most digital logic, the XOR function is an odd parity gate, and the XNOR is an even parity gate. For both definitions of XOR, the complement of the gate is called XNOR when using the same definition. That is, to make an N-input XNOR you take an N-input XOR and complement its output. In the case of parity gates, which as I have said is the generally accepted meaning of XOR and XNOR for digital logic, you can achieve the same thing by inverting any one input, or any odd number of inputs. In your first diagram showing a gate made up of two XNOR gates, there are exactly two inversions and therefore you end up with an XOR function, not XNOR.