AND Gate
The AND gate with inputs A and B and output Q implements the logical expression Q=A.B
NOT Gate
The NOT gate with inputs A and A’ (out) implements the logical expression A=A’
The XOR gate with inputs A and B and output Q implements the logical expression Q=A⊕B
NAND Gate
The NAND gate with inputs A and B and output Q implements the logical expression Q= (A.B)’