Digital Logic Circuit Simulator — Free Multi-Gate Circuit Builder

Free drag-and-drop digital logic circuit simulator. Wire AND, OR, NOT, NAND, NOR, XOR, and XNOR gates together with input switches and LED outputs, and watch boolean signal states propagate live through the circuit — with starter templates for a half-adder and a cross-coupled NOR SR latch.

← Semiconductor & Digital Electronics Studio
About this tool — how it works & FAQOpen ▾Close ▴

About the Digital Logic Circuit Simulator

This free tool lets you build a real multi-gate digital logic circuit visually — drag AND, OR, NOT, NAND, NOR, XOR, and XNOR gates onto the canvas, add input toggle switches and LED outputs, and wire pins together by clicking one then the other. Every connection carries a live boolean signal: toggle an input and watch the 0/1 state propagate through every wired gate in real time, right down to whether each LED lights up. Two starter templates — a half-adder built from an XOR and an AND gate, and a cross-coupled NOR SR latch — give you real worked circuits to load and experiment with.

Building a circuit

Click a gate in the palette (AND, OR, NOT, NAND, NOR, XOR, XNOR) to drop it onto the canvas, along with as many input switches (🔘) and LED outputs (💡) as your circuit needs. Drag any gate by its body to reposition it. Each gate shows small pin dots on its edges: input pins on the left, an output pin on the right — a NOT gate has one input pin, the two-input gates (AND/OR/NAND/NOR/XOR/XNOR) have two.

Wiring pins and reading signal state

To connect two gates, click an output pin, then click the input pin you want to feed it — a connecting wire is drawn between them. Click either pin again to cancel a pending connection, or click an existing wire to delete it. Every pin and wire is color-coded live: green means the signal at that point is logic HIGH (1), gray means logic LOW (0) — so you can trace exactly how a signal change ripples through the whole circuit just by watching the colors update.

Boolean logic behind each gate

AND outputs 1 only when both inputs are 1; OR outputs 1 when either input is 1; NOT inverts its single input; NAND and NOR are AND/OR with an inverted output (1 unless both inputs are 1, and 1 only when both inputs are 0, respectively); XOR outputs 1 when its two inputs differ; XNOR outputs 1 when they match. Chaining these primitives together is how real digital systems build arithmetic (adders), memory (latches and flip-flops), and control logic from nothing but simple 2-state switches.

The half-adder and SR latch templates

The half-adder template feeds two inputs, A and B, into both an XOR gate (producing the Sum output) and an AND gate (producing the Carry output) — the fundamental building block of binary addition. The SR latch template cross-couples two NOR gates so each one's output feeds back into the other's second input, creating a circuit with memory: with both S and R held low, the Q and Q' outputs hold whatever state they last settled into, and pulsing S or R sets or resets that stored state. The simulator resolves this feedback loop by repeatedly re-evaluating every gate until the whole circuit settles into a stable state (or flags it as an oscillating, unstable loop if it never settles).

Frequently asked questions

How is this different from the Logic Gate & Truth Table Builder?

The Logic Gate & Truth Table Builder is a calculator-style tool scoped to a single gate (or a small fixed combination) that generates its truth table. This Circuit Simulator is a full drag-and-drop canvas where you freely wire an arbitrary number of gates, input switches, and LED outputs together into a real multi-gate circuit, with live signal propagation you watch happen visually as you toggle inputs — closer to a schematic capture / breadboard simulator than a truth-table generator.

Does the simulator handle feedback loops, like the SR latch?

Yes. Most digital circuits are pure feedforward (signal flows from inputs to outputs with no loops), but sequential circuits like latches and flip-flops rely on feeding a gate's own output back into an earlier gate to create memory. The simulator re-evaluates every gate's output repeatedly (up to a capped number of passes) until the whole circuit's state stops changing — the same settling behavior real logic gates exhibit, just compressed into an instant. If a circuit is wired so it can never settle (a genuine oscillator), the tool detects the repeating pattern and flags it as an unstable feedback loop instead of freezing.

Can I build my own circuit from scratch instead of using a template?

Yes — loading a template is entirely optional. Click Clear Canvas, then add whichever gates, input switches, and LED outputs you want from the palette and wire them however you like. The canvas has no limit on the number of gates other than screen space, so you can build anything from a single AND gate to a small multi-level combinational or sequential circuit.

What do the colors on the wires and pins mean?

Green means the signal at that pin or along that wire is currently logic HIGH (1); gray means logic LOW (0). Because this updates instantly whenever you toggle an input switch or change the wiring, you can visually trace exactly how a single bit flip ripples through every gate downstream of it, all the way to whichever LED outputs it eventually reaches.

Related tools & guides