The Exclusive-OR (XOR), performs the following logic operation:
X \[\oplus\] Y = X Y’ + X’ Y
(Operator uses the symbol \[\oplus\] )
So the result is 1 only when either X is equal to 1 or Y is equal to 1, but not when both X and Y are equal to 1.
One 74HC86 circuit contains quad 2-input Exclusive-OR gates, datasheet here:
**broken link removed**
So if you want to use a single gate, use for example inputs pin 1 and pin2 and for the output pin3.
GND pin 7
and
Vcc pin 14
---------- Post added at 22:27 ---------- Previous post was at 22:19 ----------
By the way, if you want to test the circuits using some LEDs, yes, you can use a simple switch, as you may ignore the additional pulses due to bouncing contacts.