If the output `y^(')` of NAND gate is connected to the input of NOT gate (made from NAND gate by joining two inputs), as shown in Fig.
then we get back an AND gate.
The output of gate I is,
The output of gate II is,
`y=bar(y^(').y^('))=bar((bar(A.B)).bar((A.B)))=bar(bar(A.B))+bar(bar(A.B))`
`=(A.B)+(A.B)=(A.B)`
which is the Boolean expression for AND gate. Thus the combination work as AND gate. The truth table of the combination is shown in Fig., which is the truth table of AND gate.