C-MOS AND gate
Did you figure out how to make an AND gate using the NAND gates?
Hope so - and now we'll see how right you were.
When you've finished the wiring connection, turn power ON and press S1. What does LED 1 do?
Now press S2 while keep pressing S1. Is there any change in LED 1 ?
As you saw, pressing both S1 and S2 inputs 1, causing a 1 output from the AND gate. Can you follow the 1 input through the circuit until you reach a 1 output?
Try it - and don't peek at the answer. It works like this - each 1 input goes into the first NAND gate. This causes the output of the NAND to be 0. This 0 output is used for both inputs to the second NAND. The 0 inputs to the second NAND cause its output to be 1, and the LED lights.