Gate Alarm with 4093 IC

Magnetic switchCircuit works when a door or something else close SW one of sw switchs.

SW can be a magnetic switch, normally open

Gate alarm schematic with 4093