Logic Gate Simulator
Experiment with digital electronics without a breadboard. Pick a logic gate — AND, OR, NOT, NAND, NOR, XOR or XNOR — set the input switches and watch the output and the full truth table update live as you toggle.
Output
0
Expression
—
Truth table
How to use
- Choose a logic gate from the dropdown.
- Click Input A and Input B to toggle them between 0 and 1.
- The circuit diagram, output and truth table update instantly. Your current input row is highlighted.
Tips
- Start with AND and OR: they are the simplest gates and their truth tables are the easiest to memorize.
- Toggle inputs one at a time and watch only the output change — that is how real gate behavior is tested.
- XOR is the basis of binary addition; notice it outputs 1 only when the inputs differ.
Note: NOT is a single-input gate, so it ignores Input B. NAND is AND followed by NOT, NOR is OR followed by NOT, XNOR is XOR followed by NOT.
Frequently Asked Questions (FAQ)
What does the logic gate simulator do?
It builds a one-gate digital circuit: you set the inputs, pick a gate, and the output, circuit diagram and truth table update live.
Which gates are supported?
AND, OR, NOT, NAND, NOR, XOR and XNOR.
How does the NOT gate work here?
NOT is a single-input gate, so it uses input A only and ignores input B.
Do I need to install anything?
No. It runs in your browser with live updates as you toggle the inputs.