Logic gates from diodes
Logic gates can be made from diodes. Two switches give 5 V (on) or 0 V (off), as the inputs A and B, on columns 4 and 10.
Build an OR gate: a 1N4148 from each input to the output, column 7 (anodes on the inputs, stripes on 7), and a 10 kΩ from the output down to the − rail: across the gap from column 7, then a wire from the bottom of column 7 to the − rail beside it (the bottom rails are joined to the top ones at the far end). Press Run and try each switch.
Now an AND gate: turn both diodes round (anodes on the output, column 7; stripes on the inputs), and the 10 kΩ from the output up to the + rail: its wire goes to the red rail this time. Press Run and try the switches.
On a real bench a 1N4148 drops about 0.6 V at the small current here, and that drop falls by about 2 mV for every degree the diode warms. So a diode gate's levels change a little with temperature. Logic chips, which give full 0 V and 5 V levels at every gate's output, replaced diode logic for that reason.
So the OR gate's high is 4.4 V, and the AND gate's low is 0.5 V. Feed one OR gate's output into another OR gate, and that one's output, into a third. What happens to the high level?
- It falls by one diode drop at each gate: 4.4, then about 3.8, then 3.2 V, until it can't be told from low
- It stays at 4.4 V
- It goes back up to 5 V
- It inverts
Diode logic:
- OR: a diode from each input to the output, a resistor pulling the output down;
- AND: a diode from the output to each input, a resistor pulling the output up;
- each loses a diode drop from its levels, and loads the stage before it, so gates can't be chained far;
- no NOT, no gain: real logic needs transistors.