Evaluate the output of standard logic gates (AND, OR, NOT, NAND, NOR, XOR, XNOR) for given inputs.
Logic gates are the building blocks of digital circuits. Each gate performs a specific boolean operation on one or two binary inputs to produce a single binary output.
AND
A AND B = 1 iff A=1 and B=1
XOR
A XOR B = 1 iff A≠B
NAND and NOR are each universal — any boolean function can be built using only NAND gates or only NOR gates.
XOR outputs 1 when inputs differ. XNOR (equivalence gate) outputs 1 when inputs are the same. They are complements.