XOR gate:
Laws: XOR holds commutative and associative law.
1. A ⊕ B = B ⊕ A
2. (A ⊕ B) ⊕ C = A ⊕ (B ⊕ C)
i) Enable input of XOR gate = 1 (acts as inverter)
ii) Disable input of XOR gate = 0 (acts as buffer)
Important point:
i) XOR gate is an odd number of 1’ detector,
i.e. if the number of 1’s is odd ⇒ output = high
And if the number of 1’s is even ⇒ output = low
ii) Performing XOR operation on A ‘n’ times,
Question:
What is the output of this circuit?
Solution:
Performing XOR operation on A 'n' times,
Here the number of XOR is even, and input is 1 for all.
So, the output is x.
XNOR Gate:
It holds commutative and associative
A ⊙ B = B ⊙ A
(A ⊙ B) ⊙ C = A ⊙ (B ⊙C)
i) Enable input of XNOR gate = 1 (acts as buffer)
ii) Disable input of XNOR gate = 0 (acts as inverter)
Important notes:
i) Performing XNOR operation on A ‘n’ times,
ii) If the number of inputs (n) is odd, XOR ≡ XNOR and if the number of inputs (n) is even,
A ⊕ A ⊕ A = A ⊙ A ⊙ A (odd number) and A⊕ A ⊕ A ⊕ A = A ⊙ A ⊙ A ⊙ A (even number).
Contributed by