NAND gate applications - burglar alarm

When the switch is closed (burglar steps on a pressure pad) one input of the NAND gate is
LOW.
When the LDR is in the light (the burglar's torch) the other input is
LOW.
This means that if either of these things happen, i.e. the switch is closed or the light is on one of the inputs is
LOW, the output is
HIGH and the buzzer sounds.