bitlvl
EN

Gate Lab

Each level gives you inputs, outputs and a truth table. Add gates from the palette, drag them around, connect outputs to inputs, and watch the signals update live. When every row of the table matches, you pass; fewer gates than par is the real goal.

 

Click an input switch to toggle it. Drag from an output pin (right side of a gate) to an input pin (left side). Click a wire to remove it; select a gate and press Delete.

What the levels teach

  1. The basic gates. NOT, AND, OR as single gates, to learn the editor.
  2. NAND is universal. NOT from one NAND, AND from two, OR from three (De Morgan), XOR from four. Every digital circuit ever built can be made from NAND alone; CMOS chips are mostly NAND and NOR because they are the cheapest gates in transistors.
  3. Arithmetic. The half adder (XOR for the sum, AND for the carry), then the full adder that also takes a carry in, then two of them chained into a 2-bit adder. A 64-bit CPU adder is the same idea 64 times, plus tricks to make the carry fast.
  4. Selection and comparison. The multiplexer (a 1-bit “if”), majority (the carry function again), and equality (XNOR per bit, AND across).

Reading the editor

Wires carry a 0 (grey) or a 1 (blue). An input pin with nothing connected reads 0 and is flagged, so an unfinished circuit never passes by accident. The truth table on the right lists every input combination; the expected columns come from the level, the actual columns from your circuit, re-evaluated as you build. Loops (a gate feeding itself) are reported rather than simulated: these puzzles are combinational logic, where the output depends only on the current inputs.

Gate symbols

GateOutput is 1 whenSymbol
NOTthe input is 0triangle with a bubble
ANDall inputs are 1flat back, round front (D shape)
ORany input is 1curved back, pointed front
XORexactly one input is 1 (odd number)OR with a second curve at the back
NAND / NOR / XNORthe opposite of AND / OR / XORsame shape with a bubble on the output

Questions

How do I connect two gates?

Press on the small circle at the right side of a gate (its output) and drag to a circle on the left side of another gate (an input). Release to connect. An input pin takes one wire; an output can feed many inputs.

How do I delete things?

Click a wire to remove it. Click a gate to select it and press Delete or Backspace, or drag it onto the palette. “Reset level” clears everything except the inputs and outputs.

Is my circuit saved?

Yes, per level, in your browser’s local storage; nothing is uploaded. Clearing site data removes it.

Can I use more than two inputs per gate?

The sandbox has AND3 and OR3. Levels restrict the palette on purpose; chaining two 2-input gates is part of the exercise.

What is par?

The gate count of a known minimal solution with the allowed gates. Matching it is good; beating it would be news.