expression for X NOR output ZXNORZ_{XNOR}ZXNOR is,
ZXNOR=(A.B)+(A′.B′)Z_{XNOR}=(A.B)+(A'.B')\\ZXNOR=(A.B)+(A′.B′)
using de-Morgan's law,
ZXNOR=((A′.B′)′.(A.B)′)′Z_{XNOR}=((A'.B')'.(A.B)')'\\ZXNOR=((A′.B′)′.(A.B)′)′
So NAND output is ZNANDZ_{NAND}ZNAND is,
ZNAND=(A.B)′Z_{NAND=}(A.B)'ZNAND=(A.B)′
using these two following logic circuit diagram is implemented,