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.

A AND BOutput 0

The output is 1 only when both inputs are 1.

How to use this simulator

  1. Choose a logic gate from the list.
  2. Click A or B to switch between 0 and 1. NOT only uses input A.
  3. Read the output and find the highlighted input combination in the matching truth table below.
  4. 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

AND gate truth table
ABOutput
000
010
100
111

OR gate

The output is 1 when at least one input is 1.

A OR B

OR gate truth table
ABOutput
000
011
101
111

NOT gate

The output is the inverse of input A. This gate has one input.

NOT A

NOT gate truth table
AOutput
01
10

XOR gate

The output is 1 when the two inputs are different.

A XOR B

XOR gate truth table
ABOutput
000
011
101
110

NAND gate

The inverse of AND: the output is 0 only when both inputs are 1.

NOT (A AND B)

NAND gate truth table
ABOutput
001
011
101
110

NOR gate

The inverse of OR: the output is 1 only when both inputs are 0.

NOT (A OR B)

NOR gate truth table
ABOutput
001
010
100
110

XNOR gate

The output is 1 when both inputs have the same value.

NOT (A XOR B)

XNOR gate truth table
ABOutput
001
010
100
111

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.