Logic Gate Simulator
Toggle inputs (A–D), pick a gate, and see outputs instantly. Includes a truth table and Show Work steps.
How to Use
- Select a gate (AND, OR, NOT, NAND, NOR, XOR, XNOR).
- Choose how many inputs you want (1–4). Toggle inputs on/off.
- Read the output and view the generated truth table.
- Open “Show Work” to see how the output was evaluated.
Gate Panel
Live Boolean evaluation + quick presets.
Gate
—
Inputs
—
Output
—
Status:
—
AND
2-input gate
Tip: XOR/XNOR are parity gates. NOT uses only A.
Truth Table
Generated locally from the selected gate and input count. No uploads.
Enable “Generate Truth Table” to see results.
Show Work (step-by-step)
—
Work shows the Boolean expression and evaluation steps for the current inputs.
Gate Reference
Common symbols and equations (Y is output).
- AND: Y = A · B (true only if all inputs are 1)
- OR: Y = A + B (true if any input is 1)
- NOT: Y = ¬A (inverts A)
- NAND: Y = ¬(A · B)
- NOR: Y = ¬(A + B)
- XOR: Y = A ⊕ B (true if inputs differ / odd parity)
- XNOR: Y = ¬(A ⊕ B) (true if inputs match / even parity)
For 3–4 inputs, AND/OR extend naturally; XOR/XNOR are parity across all selected inputs.
FAQ
What does XOR mean?
XOR outputs 1 when an odd number of inputs are 1 (for 2 inputs: exactly one input is 1).
Why are NAND and NOR important?
NAND and NOR are functionally complete, meaning you can build any logic function using only NANDs or only NORs.
Does this simulate timing / propagation delay?
This tool evaluates ideal Boolean logic (deterministic). Timing effects can be added later as an optional mode.
Tool Info
Last updated:
Updates may include UI improvements, additional gates, export formats, and edge-case handling.