Simple circuits made of up the different types of logic gates – NOT, OR, AND NOR, NAND, XOR, XNOR – can be used to perform simple and useful tasks. Because the circuits are simple and the logic gates are reliable and mass produced, the circuits are reliable.
One such is the circuit used to make a push button lock. The circuit is shown below.
To open the lock the solenoid in the lock must be activated and this can be done by pressing switches A and B above. If B is pressed but not A then the output from NOT GATE will read 1, as will the output from B, so the buzzer will sound.