The alarm will switch off when the 4 keys connected to `A,B,C,D` are pushed in the right order.The circuit works because each gate `Stands` upon its predecessor.If any key other than the correct key is pushed, then gate 1 is knocked out of the stack, and the code entry fails. Pin 1 is held high by R4.
The IC is a quad 2 input "AND" gate, a CMOS 4081. These gates only produce a HIGH output, when BOTH the inputs are HIGH. When the key wired to `E` is pressed, current through R1 and D1 switchs Q5 on.The relay energises; and Q5 is '