Here we have used XNOR gate as the circuit intermediate. One side of the circuit is connected to the LED and the other side is connected to the input devices which gives different input and the LED gives us the different output result.
The XNOR or exclusive NOR gate is the inverter of the XOR gate. The output is 1 if both the inputs are the same and 0 if both the inputs are different.