NewThe ManyPI MCP Server is now live

Logic gates sandbox with truth tables and challenges

Build circuits from switches, gates and lamps in the browser, watch the signals flow and read the truth table as it fills in. Five challenges check themselves.

Web toolLower secondary +2CC BY 4.0

What you will learn

  • Explain what AND, OR, NOT, NAND, NOR and XOR do
  • Derive a truth table from a circuit
  • Build a half adder and a majority vote
  • Show that NAND alone can build any gate

What it is

A drawing board for digital logic. Switches are inputs, lamps are outputs, and nine kinds of part sit in between.

  • Build: add parts from the toolbar, drag them into place, and drag from an output dot to an input dot to connect them. Click a switch to flip it.

  • See: wires that carry a 1 turn blue, lamps light up.

  • Read: the truth table lists every combination of the switches and marks the one that is set right now.

  • Solve: five challenges, from "AND from NAND" to an alarm system, check the whole truth table and say which input combination is still wrong.

Gates use the rectangular IEC symbols (&, ≥1, =1, 1) taught in many European schools, with the English name under each.

Safe for school use

Everything happens in the page: no account, nothing uploaded, nothing stored. "Share" puts the circuit into the link itself, after the #, which never reaches a server. Opening a shared link only draws the circuit it describes.

Ideas for class

  1. Discover: start with the AND circuit that opens by default. Learners flip both switches and write down when the lamp lights. Then swap the gate for OR, XOR and NAND.

  2. Half adder: load the example, then ask why the second lamp is called the carry.

  3. Challenge race: pairs solve "XOR without XOR" and share their link with the class; compare how many gates each solution needs.

Reuse this material

CC BY 4.0

You may copy, adapt and share it, also commercially, as long as you credit ManyPI and link back.

"Logic gates sandbox with truth tables and challenges" by ManyPI (https://manypi.com/edu/logic-gates-sandbox), licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)