← Back to Lab
Computer Science · Topic 10 · Boolean logic

Logic gates. Flip the inputs.

Toggle the inputs and watch signals flow through the circuit in real time. Every gate type from the syllabus, single gates and combined circuits, with the live truth table row highlighted as you switch.

0478 Topic 10 — Boolean logic AND · OR · NOT · NAND · NOR · XOR
X = A AND B — output is 1 only when BOTH inputs are 1.

Circuit

Boolean expression
X = A AND B
Output X right now
0

Truth table

The highlighted row is the input combination you have set right now.
📋 Gate functions (Cambridge)
  • NOT — output is the inverse of the input.
  • AND — output 1 only when ALL inputs are 1.
  • OR — output 1 when ANY input is 1.
  • NAND — AND followed by NOT: output 0 only when all inputs are 1.
  • NOR — OR followed by NOT: output 1 only when all inputs are 0.
  • XOR — output 1 when the inputs are DIFFERENT.
✍️ Exam technique
  • Truth tables for a 3-input circuit need 2³ = 8 rows — write inputs counting up in binary (000, 001, 010 …) so you never miss a row.
  • Work through a circuit column by column: add a working column for each gate output before the final X column.
  • A small circle on a gate output means NOT (inversion) — that's what turns AND into NAND.
🎯 Syllabus reference (0478)
  • Topic 10 — Boolean logic: use standard gate symbols; state the function of each gate; build and read truth tables (up to three inputs); write logic expressions for circuits and draw circuits from expressions or problem statements.

Ask the lab assistant