Question -
Answer -
In both the given circuits, A and B arethe inputs and Y isthe output.
(a) The output of the left NAND gate will be
, as shown in the following figure.
Hence, the output of the combination of the two NAND gatesis given as:
Hence, this circuit functions as an AND gate.
(b)
is the output of the upperleft of the NAND gate and
is the output of the lower half of the NANDgate, as shown in the following figure.Hence, the output of the combination of the NAND gateswill be given as:

Hence, this circuit functions as an OR gate.