CD4000 gate drawer
16 chips on breadboards, powered, every input tied low and ready to rewire. There is no microcontroller in it: the simulator solves the 16 parts as a circuit, so it runs the moment you press Run, and nothing needs compiling.
Teaching? Assign it to your class in one click.
Beginner About 20 minutes to build and run. Runs in your browser. Free, and no account needed.
The parts retail for about $21. On Mokxi they're free.
What you'll learn
- What AND, OR, NAND, NOR, XOR and XNOR do
- Why unused inputs are tied low, not left floating
- Reading a truth table from a real circuit
- The difference between a gate and an inverter
- What a Schmitt trigger input is for
- Difficulty: Beginner
- Time: About 20 minutes
- Parts: 22
How it works
This is a drawer of 16 CD4000 series chips on three breadboards: NOR, NAND, OR, AND, XOR, XNOR, inverters and Schmitt triggers. Each chip has power on its VDD pin and ground on its VSS pin.
Every input is wired to ground, so none is left floating. Nothing else is connected. No code runs, because there is no microcontroller.
You pick a chip and move an input wire from ground to the plus rail. Then you put an LED and a resistor on an output and see what the gate does. Each chip's help page has its pins and truth table.
Parts list
22 parts, plus the jumper wires. They retail for about $21; on Mokxi they're free.
- 3 × Full-size breadboard
- 3 × Power, 5 V
- 1 × CD4001 quad NOR
- 1 × CD4011 quad NAND
- 1 × CD4071 quad OR
- 1 × CD4081 quad AND
- 1 × CD4070 quad XOR
- 1 × CD4030 quad XOR
- 1 × CD4077 quad XNOR
- 1 × CD4002 dual 4-input NOR
- 1 × CD4012 dual 4-input NAND
- 1 × CD4023 triple 3-input NAND
- 1 × CD4025 triple 3-input NOR
- 1 × CD4069 hex inverter
- 1 × CD4049 hex inverter buffer
- 1 × CD4050 hex buffer
- 1 × CD4093 quad Schmitt NAND
- 1 × CD40106 hex Schmitt inverter
Wiring table
Every connection, pin by pin, read from the circuit itself. Each row joins the pin on the left to the pin on the right, by a jumper wire or a breadboard strip.
| Part and pin | Connects to |
|---|---|
| CD4001 quad NOR pin VDD | 5 V |
| CD4011 quad NAND pin VDD | 5 V |
| CD4071 quad OR pin VDD | 5 V |
| CD4081 quad AND pin VDD | 5 V |
| CD4070 quad XOR pin VDD | 5 V |
| CD4030 quad XOR pin VDD | 5 V |
| CD4001 quad NOR pin 1A | Ground |
| CD4001 quad NOR pin 1B | Ground |
| CD4001 quad NOR pin 2A | Ground |
| CD4001 quad NOR pin 2B | Ground |
| CD4001 quad NOR pin VSS | Ground |
| CD4001 quad NOR pin 3A | Ground |
| CD4001 quad NOR pin 3B | Ground |
| CD4001 quad NOR pin 4A | Ground |
| CD4001 quad NOR pin 4B | Ground |
| CD4011 quad NAND pin 1A | Ground |
| CD4011 quad NAND pin 1B | Ground |
| CD4011 quad NAND pin 2A | Ground |
| CD4011 quad NAND pin 2B | Ground |
| CD4011 quad NAND pin VSS | Ground |
| CD4011 quad NAND pin 3A | Ground |
| CD4011 quad NAND pin 3B | Ground |
| CD4011 quad NAND pin 4A | Ground |
| CD4011 quad NAND pin 4B | Ground |
| CD4071 quad OR pin 1A | Ground |
| CD4071 quad OR pin 1B | Ground |
| CD4071 quad OR pin 2A | Ground |
| CD4071 quad OR pin 2B | Ground |
| CD4071 quad OR pin VSS | Ground |
| CD4071 quad OR pin 3A | Ground |
| CD4071 quad OR pin 3B | Ground |
| CD4071 quad OR pin 4A | Ground |
| CD4071 quad OR pin 4B | Ground |
| CD4081 quad AND pin 1A | Ground |
| CD4081 quad AND pin 1B | Ground |
| CD4081 quad AND pin 2A | Ground |
| CD4081 quad AND pin 2B | Ground |
| CD4081 quad AND pin VSS | Ground |
| CD4081 quad AND pin 3A | Ground |
| CD4081 quad AND pin 3B | Ground |
| CD4081 quad AND pin 4A | Ground |
| CD4081 quad AND pin 4B | Ground |
| CD4070 quad XOR pin 1A | Ground |
| CD4070 quad XOR pin 1B | Ground |
| CD4070 quad XOR pin 2A | Ground |
| CD4070 quad XOR pin 2B | Ground |
| CD4070 quad XOR pin VSS | Ground |
| CD4070 quad XOR pin 3A | Ground |
| CD4070 quad XOR pin 3B | Ground |
| CD4070 quad XOR pin 4A | Ground |
| CD4070 quad XOR pin 4B | Ground |
| CD4030 quad XOR pin 1A | Ground |
| CD4030 quad XOR pin 1B | Ground |
| CD4030 quad XOR pin 2A | Ground |
| CD4030 quad XOR pin 2B | Ground |
| CD4030 quad XOR pin VSS | Ground |
| CD4030 quad XOR pin 3A | Ground |
| CD4030 quad XOR pin 3B | Ground |
| CD4030 quad XOR pin 4A | Ground |
| CD4030 quad XOR pin 4B | Ground |
94 more connections: open it in the simulator to see them all.
The notes that come with it
There is no microcontroller in this one, so nothing is compiled: the simulator solves the circuit itself. The file in the editor is the notes that come with it.
// CD4000 gate drawer.
//
// Every chip is on a breadboard and powered, and every one of its inputs is
// tied low by a wire to a ground rail, so nothing floats. Nothing else is
// wired: pick a chip, move an input's wire to the + rail, put an LED with a
// resistor on an output, and see what it does. Each chip's help page has its
// pins and its truth table.
Troubleshooting
The usual mistakes with this circuit, and the fix for each.
- The output LED never lights, whatever the inputs. This project
Put the LED in series with a resistor from the output pin to ground, and check the chip's truth table for what the output should be. - A gate behaves strangely after you rewire it. This project
Do not leave an input unconnected. Tie it to the plus rail or to ground, because a floating CMOS input picks up noise. - Outputs behave randomly. CD4001 quad NOR
Tie every unused input to GND or VDD. A floating CMOS input picks up noise. Also tie unused gates so they do not waste power. - It is slow or weak at low voltage. CD4001 quad NOR
The CD4001 runs on 3 V to 18 V, VDD on pin 14 and VSS on pin 7. Output current is small, so use a resistor with an LED and add a 0.1 uF decoupling cap. - An unused gate in the package floats and the output behaves oddly, or current rises. CD4011 quad NAND
Tie both inputs of every unused NAND gate to GND or VCC. Floating CMOS inputs pick up noise and can draw current. VDD is pin 14 and VSS is pin 7. - The output does not drive an LED or other load well. CD4011 quad NAND
CMOS outputs supply only a few mA. Add a resistor and use a buffer or transistor for anything heavier. Supply is 3 to 18 V, and the output swings to the supply voltage. - An output is stuck or the chip acts randomly. CD4071 quad OR
Never leave a CMOS input floating. Tie unused OR inputs to ground, and tie unused gates' inputs low. A high on any input of an OR gives a high output. - The output cannot drive a load such as an LED or motor. CD4071 quad OR
CMOS outputs only supply a few mA. Use a resistor and LED with low current, or add a transistor. Connect VDD (pin 14) and VSS (pin 7), and add a 0.1 uF decoupling capacitor.
Change it and keep it
Open it in the editor, change the circuit or the code, and keep your version in a free account.