For the circuit to function properly, the input if the circuit must be connected either to VCC or to the ground. In order to see the result at the output circuit we have to change the position of the switch S1 and S2 following the condition on the truth table