Work out logic gate output instantly with clear inputs, formula shown and shareable results.
Each logic gate implements one Boolean function of its inputs. NAND and NOR are universal: every other gate, and hence every digital circuit, can be built from copies of either one alone.
NAND
NAND(A, B) = NOT(A AND B)
XOR
XOR(A, B) = 1 exactly when the inputs differ
0. NAND outputs low only when every input is high.
In CMOS a NAND needs fewer transistors than an AND, and its universality means one cell type can implement any function.