Logic gates and universal gates
Digital electronics · Physics
DC circuit
Interactive 3DElectrons drift around the loop — raise the voltage and watch the current obey Ohm's law.
Controls
Drag the sliders or type a value — the simulation updates live.
V
1V12V
Study notes
Worked example - build AND using only NAND gates. Step 1: a NAND gate gives Y = (A.B)-bar. Step 2: feed Y into a second NAND with its inputs tied together - a tied NAND acts as NOT, giving ((A.B)-bar)-bar = A.B. So AND = 2 NANDs. Similarly OR from NANDs: invert each input with a NAND-NOT, then NAND the results: ((A-bar).(B-bar))-bar = A + B by De Morgan - 3 NANDs total. This is why datasheets list the 7400 (quad NAND) as the most-used chip in history.