Logic Simulator
Build and simulate digital logic circuits in the browser. Drop in gates, wire them together, and watch signals propagate.
What is a Logic Simulator?
A logic simulator is software that models the behavior of digital circuits — the gates, flip-flops, and buses that make up CPUs, GPUs, and every other digital chip. You drop primitive components onto a canvas, wire them together, and watch the simulator propagate
0s and 1s through the network in real time. Logic simulators are the central pedagogical tool in undergraduate computer architecture courses, where students typically build half-adders, full-adders, ALUs, register files, and eventually toy CPUs from a tiny set of primitives. This simulator is a TypeScript port of Sebastian Lague's Digital-Logic-Sim, restricted to NAND, Clock, Pulse, and Tri-State Buffer — because NAND is functionally complete, you can derive every other gate yourself. Need to test Boolean expressions analytically? Try the Scientific Calculator. Building a study deck for a CS course? Use the Flashcard Generator.Loading editor…
How to use this tool
- 1Drop primitives onto the canvasDrag NAND gates, Clocks, Pulses, Tri-State Buffers, splitters, and mergers from the left panel onto the work area.
- 2Wire them togetherClick an output port and drag to an input port. Wires automatically infer bit width from the connected ports.
- 3Add input switches and output probesUse input nodes to drive 0/1 manually, or wire a Clock to generate a square wave. Output probes display the current logic level.
- 4Save your circuitHit Save to persist the circuit to localStorage. Export the JSON to share or version-control your designs.
