Logic Gate Simulator — Build Digital Circuits
Drag and drop AND, OR, NOT, XOR, NAND, NOR, and BUFFER gates onto a canvas. Wire them together and toggle input signals to see how logic propagates through your circuit in real time. No signup, runs entirely in your browser.
Tips for Building Logic Circuits
Build a half adder
A half adder adds two single bits. Connect A and B to an XOR gate for the Sum output and to an AND gate for the Carry output. This is the fundamental building block of binary arithmetic.
De Morgan's theorem
De Morgan's law states: NOT(A AND B) = (NOT A) OR (NOT B). You can verify this using a NAND gate and comparing its output to two NOT gates feeding an OR gate — both produce the same truth table.
Universal gates
NAND and NOR are universal gates — any logic function can be implemented using only NAND gates or only NOR gates. This matters for chip manufacturing where a single gate type simplifies fabrication.
Read with the truth table
Use the Truth Table Generator tool to verify complex expressions. Build the circuit here, record the outputs for all input combinations, then compare to the expected truth table.
Frequently Asked Questions
What logic gates are supported?
The simulator supports AND, OR, NOT, XOR, NAND, NOR, and BUFFER gates. NOT and BUFFER are single-input gates; all others take two inputs.
How do I connect gates?
Switch to Connect mode, click the output node (source), then click the input port of the destination gate. Green wires carry a HIGH (1) signal; grey wires carry LOW (0).
How do I toggle an input signal?
Click any input node (the rectangular nodes labelled A, B, etc.) to toggle it between 0 and 1. The circuit updates immediately and signal propagation is shown through wire colours.
Can I delete a wire or gate?
Yes. Switch to Delete mode and click any gate node or wire to remove it. Connected wires are also removed when you delete a gate.
What is a NAND gate?
A NAND gate is a NOT + AND combination. Its output is HIGH unless both inputs are HIGH. NAND gates are universal — any logic function can be built entirely from NAND gates.
Is this suitable for CS coursework?
Yes. The simulator is designed for learning digital logic at A-level and undergraduate level. You can build combinational circuits like half adders, multiplexers, and decoders.