The CD4011 is a quad 2-input NAND gate IC from the CMOS 4000-series family. It’s widely used in simple logic, timing, and control circuits thanks to its flexible supply voltage and low power consumption.

In this article, we’ll take a practical look at the CD4011 — covering its pinout, logic operation, and common ways we use in real circuits.
Along the way, we’ll build a basic experiment circuit to verify the logic function of the chip and explore a few practical example circuits where the we use the CD4011 as a building block.
What Is the CD4011?
The CD4011 is a quad independent two-input NAND gate IC in the CMOS logic family. It contains four independent working NAND gates, each gate having exactly two inputs and one NAND output.

The CD4011 has 14 pins, and it’s often sold in the classic DIP-14 (dual-in-line) package. Nonetheless, it’s also available in SMD-type packages, such as SOIC or TSSOP.
Most often, the chips you would see are labeled as CD4011BE, with the -B suffix indicating it’s built as a B-series CMOS device. B-series CMOS has a higher rated voltage and some other improvements. Likewise, the -E suffix represents the DIP-14 package.

If you’re interested in getting this chip, whether for an experiment or an actual project, the DIP-14 version is widely available and inexpensive.
👉 CD4011 Quad NAND Gate CMOS (affiliate link)
The CD4011’s Features
- Quad 2-input NAND gate IC (four independent NAND gates).
- Part of the 4000-series CMOS logic family.
- Wide operating supply-voltage range (3V to 18V for the -B suffix unit).
- Very high CMOS input impedance, suitable for interfacing with sensors and switches.
- Low static power consumption compared to TTL logic.
- CMOS push-pull outputs capable of directly driving logic inputs.
- Suitable for low-frequency and control-oriented logic applications.
Typical Applications
The CD4011 is used in a wide range of applications because the NAND is a very versatile logic gate. The list below is not exhaustive, but it will help us get the gist of things.
1️⃣ As basic NAND logic gates
The CD4011 is primarily used as a NAND logic IC, providing four independent 2-input NAND gates. Combined with the flexible supply-voltage range and low power consumption of the CMOS logic family, it is suitable for simple and reliable logic operations.
Because NAND gates are functionally complete, the CD4011 can also be used to implement other basic logic functions, such as AND, OR, and NOT, using only NAND gates.
2️⃣ As SR latches or simple memory circuits
NAND gates can be connected together to form an SR latch (set-reset). A basic SR latch requires two NAND gates, while a gated SR latch typically uses four, making the CD4011 a convenient choice for small memory and control circuits.
3️⃣ As oscillators or astable multivibrators
The CD4011 is also used in simple astable multivibrator circuits, such as the RC oscillator and the Pierce oscillator. Also, in toner or audio generator circuits. In these designs, NAND gates are often configured to behave as inverters (NOT gate), allowing the IC to generate square-wave signals for timing or clock purposes.
The CD4011 Pinouts and Functions
The four NAND gates of the CD4011 have two dedicated inputs and one output. The pinouts for the DIP-14 package version, along with the function of each pin, are shown below.

Pins 7 and 14 are the power pins. They serve as VSS (ground) and VDD (positive supply), respectively. The logic inputs are, in ascending order, pins 1, 2, 5, 6, 8, 9, 12, and 13. On the other hand, the logic outputs are pins 3, 4, 10, and 11. Alternatively, refer to the pinouts in the table format below.
| Pin No. | Pin Label | Pin Function |
| 1 | A | Gate 1 INPUT |
| 2 | B | Gate 1 INPUT |
| 3 | J | Gate 1 OUTPUT |
| 4 | K | Gate 2 OUTPUT |
| 5 | C | Gate 2 INPUT |
| 6 | D | Gate 2 INPUT |
| 7 | VSS | Negative Voltage Supply |
| 8 | E | Gate 3 INPUT |
| 9 | F | Gate 3 INPUT |
| 10 | L | Gate 3 OUTPUT |
| 11 | M | Gate 4 OUTPUT |
| 12 | G | Gate 4 INPUT |
| 13 | H | Gate 4 INPUT |
| 14 | VDD | Positive Voltage Supply |
The CD4011 — like other DIP package ICs — has an indent or dot indicating the side at which the first pins start. Otherwise, one of the chip’s ends would have a notch with pin 1 to the left of it.
NAND Logic Function and Operation (CD4011)
We’ve already covered the NAND logic function in detail in our logic-gate article, so this section focuses specifically on how it applies to the CD4011.
Let’s use the first NAND gate inside the CD4011 as an example, focusing on pins 1, 2, and 3 (A, B, and J, respectively). With that said, all four NAND gates on the chip are electrically independent and behave identically; any gate can be used interchangeably with any other.
The diagrams above show all possible input combinations for a 2-input NAND gate and the corresponding output. In simple terms, the CD4011 behaves as follows:
- A = 0, B = 0 → J = 1
- A = 0, B = 1 → J = 1
- A = 1, B = 0 → J = 1
- A = 1, B = 1 → J = 0
We often summarize this relationship using a truth table like this one:
| INPUT | OUTPUT | |
| Pin 1 (A) | Pin 2 (B) | Pin 3 (J) |
| 0 | 0 | 1 |
| 1 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 1 | 0 |
Since the CD4011 is a CMOS IC, all inputs must be tied to some logic level. Unused inputs should be connected to either VDD (logic “1”) or GND (logic “0”), as floating inputs can cause unpredictable behavior.
Practical Circuit Examples
To better understand how the CD4011 behaves in real circuits, it helps to move beyond truth tables and test it in practical setups. That’s exactly what we’ll do here.
In this section, we’ll start with a basic experiment circuit to verify the NAND gate operation we learned about earlier. Then, we’ll look at a couple of practical circuits where the CD4011 is employed as a functional building block in practical applications.
Basic Experiment Circuit
The purpose of this experimental circuit is to allow us to visualize the logic in working without the need for a meter or measuring devices. The circuit itself is quite simple, containing only two switches, three resistors, and LEDs, as shown below.

The two switches are used to apply VDD to the two inputs of the first NAND gate. Whereas LED1, LED2, and LED3 indicate the logic level of the input/output it’s connected to. Or, in other words:
- A = 1 → LED1 turns ON; A = 0 → LED1 turns OFF
- B = 1 → LED2 turns ON; B = 0 → LED2 turns OFF
- J = 1 → LED3 turns ON; J = 0 → LED3 turns OFF
The unused input pins are connected to the GND. As for the power supply, we’re using a 9V from our regulated power supply. Any other voltage would work, as long as it is within 3V to 18V. We quickly assemble it onto a breadboard, as shown below.

How it works is very simple. We apply “1” or “0” logic using the switch, and we see the current logic level via the LEDs. The logic operation is exactly the same as in the truth table from earlier.
The schematic below shows that S1 is ON, causing LED1 to turn ON as well. Meanwhile, S2 is OFF, thus LED2 is also OFF. As a result, LED3 is ON (NAND outputs “1” logic).

This time, both switches (S1 and S2) are turned ON. The truth table shows that when both inputs are “1”, the output is “0” logic. Which we can confirm is true because the LED3 turns off (NAND output “0” logic).

Useful Practical Circuits
The CD4011 has many uses beyond basic logic functions, particularly in timing and signal-generation circuits. Below are some practical examples from this site:
- CD4011 NAND Logic Gate Oscillator Circuits
A collection of oscillator and tone control circuits using NAND gates from the CD4011. - DIY Sunrise Alarm Circuit Using LDR and CD4011 (No Arduino)
Fun project about a sunrise alarm circuit that uses the CD4011 as both a makeshift comparator and alarm tone generator. - 9-Hour Timer Circuit using Crystal Oscillator and Digital ICs
A long-duration alarm circuit using only digital ICs. The CD4011 is used together with the CD4082 in the part of the circuit that sets the alarm duration.
These are just a few examples — many other circuits you can do with the CD4011 as a core building block. If you have any ideas or suggestions for circuits that utilize the CD4011, please share them with us, and we’ll explore them together.
CD4011’s Sister Chips (CD4012 and CD4023)
Alongside the CD4011, which has 4x 2-input NAND gates, there are also the CD4012 and CD4023. These two chips are dedicated NAND gate ICs in the CMOS logic family, similar to the CD4011. However, unlike the CD4011, these two have more than 2 inputs per gate.
The CD4012 contains two NAND gates in total, with each gate having 4 inputs. Likewise, the CD4023 has three NAND gates, each with 3 inputs. So, in summary:
- CD4011 → Quad (4x) 2-input NAND gates
- CD4023 → Triple (3x) 3-input NAND gates
- CD4012 → Dual (2x) 4-input NAND gates
Want to go deeper?
We’ve extended this article on Patreon with real-world measurements of the CD4011, comparisons with datasheet values, and notes on common pitfalls we encountered while working with it.
👉 Read the extended CD4011 article on Patreon
Exclusive posts on Patreon come free of advertisements and in PDF format with high-definition illustrations. Membership fees will allow us to continue to do what we do without as much reliance on advertisement. Thank you very much.
Hello. I’m Chayapol, but I could also go by Aot. I write and draw illustrations for ElecCircuit.com.
I usually cover articles related to digital electronics, logic, or basic principles or ideas on the site.