Simple XNOR Gate with LED.
Shows the working of an XNOR gate with a 5v source.
I used 2 pulldown resistors to give the XNOR gate the LOW input when the switches are open, otherwhise they would be floating and weird things can happen.
Such as the XNOR gate detecting a high input when floating, making the LED turn on even when the switches are open.
The XNOR gate OUTPUT turns HIGH when "both" INPUTS are either HIGH or LOW. When only 1 INPUT is HIGH or LOW. The OUTPUT turn LOW.
-----------------------------------------------------
Please bare in mind (altough not showing here) that besides the INPUT and OUTPUT pins the XNOR gate also has VDD (5Volt) and VSS (Ground) pins which need to be connected to 5 Volts and GROUND.
This makes it possible for the LED to turn ON even when the switches are open.
This XNOR gate would have 5 pins.
1 VDD (5volts)
2 VSS (Ground)
3 Input pin.
4 Input pin
5 Output pin.
The XNOR gates come in a variety of "packages" (ic's). For example a XNOR Gate with 3 or 4 INPUTS.
There are also IC'S with 2 or more XNOR Gates on 1 IC.