⚡ Logic Gates Simulator

Click inputs A and B to toggle · Select a gate type · Watch truth table update live

Gate Type

Inputs

Output

Result Q 0
Gate AND
Expression A · B

Truth Table

A B Q

⚡ Logic Gates Simulator

Toggle inputs and watch 8 types of logic gates — AND, OR, NOT, XOR, NAND, NOR, XNOR and Buffer — compute outputs in real time. A live truth table updates alongside animated signal pulses.

🔬 What It Demonstrates

Each gate implements a Boolean function: AND outputs 1 only when both inputs are 1; OR outputs 1 when either is 1; XOR outputs 1 when inputs differ. NAND and NOR are universal — any Boolean circuit can be built using only NAND (or only NOR) gates.

🎮 How to Use

Switch between gate types using the selector. Toggle inputs A and B by clicking. Watch the animated pulse travel through the gate symbol and the truth table highlight the current row.

💡 Did You Know?

NAND gates are called 'universal' because any other gate can be constructed from NAND alone. The Apollo Guidance Computer used approximately 5,600 NOR gates to navigate astronauts to the Moon.