The NAND logic gate
Build a decision with two switches
NAND means NOT AND: first ask whether both inputs are 1, then reverse that answer. A logic gate performs a rule on digital inputs. In this ideal 5 V model, logic 0 means 0 V and logic 1 means 5 V; these are voltage states, not counts of electrons.
EXPERIMENT BENCH
Change the circuit settings, predict the readings, then check a challenge. These are learning models, with the assumptions explained in each lesson.
Sign in to save progress. Guest progress stays on this device.
How it works
Ideal truth table only. Defined inputs have no floating state; actual thresholds, delays and output load limits are omitted. This is not a hardware-tested chip model.
Y = NOT(A AND B). A and B are inputs; Y is output. Only A = 1 and B = 1 makes Y = 0. Any zero input makes Y = 1. Power must be on to obtain the model output.
Difficulty
Build · Observe
Power on with A = 0 and B = 0. Obtain output 5 V (logic 1).
Need a hint?
A=0; B=0 → Y=1; 5 V
Explore · Adjust
Set both inputs to 1. Obtain output 0 V (logic 0).
Need a hint?
A=1; B=1 → Y=0; 0 V
Solve it · Discover the limit
Set A = 1 and B = 0. Obtain output 5 V and explain why one low input is enough.
Need a hint?
A=1; B=0 → Y=1; 5 V
Extra reading and circuit recipes
Build a decision with two switches
A useful connection
Connect both NAND inputs to the same defined signal and the gate becomes an inverter: 0 becomes 1 and 1 becomes 0.
A surprising detail
Boolean logic uses two states, 0 and 1. Networks made only of NAND gates can implement any rule in that logic: NAND is a universal gate.
A useful trap to avoid
The sliders represent driven logic levels. An unconnected physical input is not automatically logic 0.
A stays 0 while B changes from 0 to 1. Y…
- changes to 0
- stays 1
- becomes undefined
Read more
With A = 0, A AND B is always 0, so NOT makes the output 1.