When the switching signal is valid, the output is a 500Hz square wave when the 1Hz signal is at a high level and a low level when the 1Hz signal is at a low level, so the output is a modulation waveform of 1HZ and 500Hz.
If the switching signal is invalid, the output will go low.