Labs / Computer Science
Logic Gates
Click the A and B switches to flip their bits from 0 to 1, then pick a gate and watch the output lamp respond. Lit wires carry a 1, dark wires carry a 0, and the highlighted row of the truth table always shows exactly why the answer came out the way it did.
A 1B 0Y 1
What to try
- Which gate lights its lamp only when both inputs are 1, and which one lights up as soon as either input is 1?
- The NAND gate is just AND with the output flipped. Can you predict its truth table before you look at it?
- XOR means "different". What pattern of inputs turns its lamp off, and does that match the highlighted row?
- Open the "XOR = NANDs" preset. How can four copies of the same NAND gate behave exactly like one XOR?
- If NAND alone can be wired into XOR, do you think every other gate could be built from NANDs too?