Indosolar Interview Question

NAND gate, XOR gate explanations