HomeDigitalToolsInterview

Logic Gate Simulator

Drag gates onto the canvas, wire them together, toggle inputs — watch signals propagate live. Build any combinational circuit right in your browser.

Add
Examples:
Click a gate button above, then click on canvas to place it. Gates: 0 | Wires: 0
Label your INPUTs A, B, C… and OUTPUTs Y, Z… (double-click a gate to rename)

Logic Gate Reference

GateSymbolBooleanTruth (A=1,B=1)Use case
AND&Y = A·B1Enable / mask
OR≥1Y = A+B1Combine signals
NOT¬AY = Ā0 (A=1)Invert
NAND¬(A·B)Y = (A·B)̄0Universal gate
NOR¬(A+B)Y = (A+B)̄0Universal gate
XORA⊕BY = A'B+AB'0Parity / adder
XNOR¬(A⊕B)Y = AB+A'B'1Comparator
MUX 2:1Y = S'A+SBData selection

How to Build a 2:1 MUX from AND/OR/NOT

A 2:1 MUX selects between two inputs A and B using a select line S: Y = S'·A + S·B.

Gates needed: 1× NOT (invert S), 2× AND (S'·A and S·B), 1× OR (combine). Try loading the example above!

How to Build a Half Adder

Sum = A ⊕ B (XOR gate), Carry = A·B (AND gate). Two gates total — simplest binary adder circuit.

How to Build a Full Adder

Sum = A ⊕ B ⊕ Cin. Carry-out = A·B + Cin·(A⊕B). Built from two half adders + one OR gate (5 gates total).