Logic gates simulator
Explore seven logic gates directly in your browser. Choose a gate, toggle its binary inputs and compare the result with its truth table. No installation is needed for this single-gate demo.
The output is 1 only when both inputs are 1.
How to use this simulator
- Choose a logic gate from the list.
- Click A or B to switch between 0 and 1. NOT only uses input A.
- Read the output and find the highlighted input combination in the matching truth table below.
- For multi-gate circuits, memory and waveforms, download the Windows circuit editor.
A binary input has two possible values: 0 and 1. In this demo the output changes immediately. It models Boolean logic, not physical voltage, transistor behavior or propagation delay.
AND gate
The output is 1 only when both inputs are 1.
A AND B
| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
OR gate
The output is 1 when at least one input is 1.
A OR B
| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
NOT gate
The output is the inverse of input A. This gate has one input.
NOT A
| A | Output |
|---|---|
| 0 | 1 |
| 1 | 0 |
XOR gate
The output is 1 when the two inputs are different.
A XOR B
| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
NAND gate
The inverse of AND: the output is 0 only when both inputs are 1.
NOT (A AND B)
| A | B | Output |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
NOR gate
The inverse of OR: the output is 1 only when both inputs are 0.
NOT (A OR B)
| A | B | Output |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
XNOR gate
The output is 1 when both inputs have the same value.
NOT (A XOR B)
| A | B | Output |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
From one gate to a digital circuit
Logic gates become more useful when connected. An XOR gate and an AND gate form a half adder. Feedback and clocked storage let circuits keep state; an 8-bit RAM stores a byte for later reading.
This browser tool simulates a single gate at a time. LogicForge for Windows provides a circuit canvas, wires, custom ICs, a logic analyzer and bundled examples for larger designs.
