Logic Gate Simulator
Describe a combinational circuit in a simple netlist, get its full truth table, minimal expression and gate count, and verify it against an expected function.
Last reviewed by the Radiatus Cloud team
Need this done properly for your business?
Radiatus delivers secure cloud, DevOps & compliance engineering.
NAND alone builds everything
Every Boolean function can be constructed from NAND gates and nothing else, and the same is true of NOR. That property, functional completeness, is why real logic families standardise on one gate type: fabrication is simpler when every cell is the same, and any circuit can be rewritten into that form. An inverter is a NAND with both inputs tied together, an AND is a NAND followed by that inverter, and everything else follows from those two.
The truth table is the specification and the circuit is one implementation
Two circuits with different gates and different gate counts are the same function if their truth tables match. That is what makes optimisation meaningful: you can replace a circuit with a cheaper one and prove the replacement correct by comparing tables rather than by reasoning about the gates. It is also why an expression such as A AND B OR A AND C can be replaced by A AND (B OR C), saving a gate, with no argument required.
Gate delay accumulates along the longest path
A combinational circuit settles after a delay set by its critical path, the longest chain of gates from any input to any output. Adding gates in parallel costs area and no time; adding them in series costs time. That is why a ripple-carry adder is slow and a carry-lookahead adder is not, despite using more gates: the second trades area for depth, and depth is what the clock speed depends on.
Related tools
- Data Collection Analysis — Analyze app description to infer data collection.
- Dark Pattern Detector — Scan UX text for manipulative patterns.
- AI Risk Disclosure — Generate disclosure text for AI features.
- Maturity Radar — Generate a radar chart of security maturity.
Frequently Asked Questions
Why is NAND special?
It is functionally complete: every Boolean function can be built from NAND gates alone, as can every function from NOR alone. That lets a logic family standardise on one cell type.
What makes two circuits equivalent?
Identical truth tables. The table is the specification and the circuit is one implementation, which is what makes replacing a circuit with a cheaper one provable rather than arguable.
What is the critical path?
The longest chain of gates from any input to any output. It sets how long the circuit takes to settle, and it is why adding gates in parallel is free in time while adding them in series is not.
How many rows does a truth table have?
Two to the power of the input count, so ten inputs give 1024 rows and twenty give over a million. That growth is why exhaustive verification stops being practical quite quickly.
What netlist syntax does this use?
One assignment per line, such as s = a XOR b, using AND, OR, NOT, NAND, NOR, XOR and XNOR. Names not assigned anywhere are treated as inputs.
Privacy & Security
Everything runs in your browser; nothing is uploaded.
How to Use
Write a netlist to see its truth table and gate count.
Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.