Look at the above circuit, the value of P can be found by the idea of AND gate, P=A⋅B and the value of Q, can be calculated by the idea of OR gate, Q=A+B. Then expression for Y can be taken by the idea of NAND gate, ⇒Y=P⋅Qˉ by the idea of Demorgan's theorem, Y=Pˉ+Qˉ=Aˉ+Bˉ+Aˉ⋅Bˉ
![]()
A0011B0101Y=Aˉ+Bˉ+Aˉ⋅Bˉ1110