Contents

Digital Electronics
Number Systems
Logic Gates
Boolean Algebra
Combinational Circuits
Sequential Circuits
Memory & PLDs
Digital System Design
Other Topics
Other Subjects
Section Progress27%

4 of 15 articles

NAND Gate

Universal gate, truth table, Y=(AB)', IC 7400.

Darshan N
Updated: 19 March 2026
10 min read

The NAND gate is one of the two universal logic gates in digital electronics. A universal gate is one that can implement any Boolean function by itself, without requiring any other type of gate. This property makes the NAND gate the most widely used gate in practical integrated circuit design, where minimizing gate variety reduces manufacturing complexity and cost.

Understanding NAND gate universality, its Boolean expression, and how to build AND, OR, and NOT gates using only NAND gates is a mandatory topic for GATE Digital Electronics and is tested in university examinations regularly.

NAND Gate: Symbol, Truth Table and Boolean ExpressionABYNANDY = (AB)' = A' + B'IC: 7400 (Quad 2-input NAND)Truth TableABY=(AB)'001011101110Output is LOW only when BOTH inputs are HIGH (inverse of AND)
Figure 1: NAND gate symbol (AND + bubble), truth table, and Boolean expression Y = (AB)' = A' + B'

Core Concept Explanation

The NAND gate performs the complement of the AND operation. Its output Y = (AB)' equals 0 only when both inputs A and B are 1. For all other input combinations, the output is 1. The name NAND stands for NOT-AND, reflecting the gate's function as an AND gate followed by an inverter. The inversion is shown symbolically by a bubble at the output of the AND gate body.

By De Morgan's theorem, (AB)' = A' + B'. This means a NAND gate is equivalent to an OR gate with both inputs individually inverted. This dual interpretation is at the heart of why NAND is universal: it inherently contains both AND and OR behavior through its output expression.

In CMOS technology, the NAND gate is implemented more efficiently than the AND gate. The CMOS NAND uses two NMOS transistors in series (pull-down network) and two PMOS transistors in parallel (pull-up network). Output goes low only when both NMOS transistors conduct simultaneously. The CMOS NAND has smaller transistor sizes than an AND gate (which needs NAND + NOT) and hence is faster and more area-efficient.

Mathematical Expression

The Boolean expression for the two-input NAND gate is:

Y = (A.B)' = A' + B' [by De Morgan's theorem]

The NAND gate can implement all three basic gates: NOT gate (connect both inputs together: A NAND A = A'), AND gate (NAND output fed into another NAND configured as NOT), and OR gate (apply De Morgan: invert both inputs individually using NAND-as-NOT, then NAND them together). Since any Boolean function can be expressed using NOT, AND, and OR, and all three can be built from NAND gates alone, the NAND gate is functionally complete.

Practical Understanding

The IC 7400 is the quintessential TTL NAND gate IC. It contains four independent two-input NAND gates on a 14-pin DIP package. In TTL logic, the NAND gate is produced most naturally from the transistor-transistor logic structure, making it the default gate type in the 74-series family. Most complex TTL logic designs use NAND-based implementations for their internal structure.

In laboratory experiments, students routinely verify NAND universality by constructing NOT, AND, and OR gate equivalents using only 7400 ICs. This exercise reinforces the concept that logic design does not require multiple gate types when a universal gate is available, which simplifies inventory in mass production of digital hardware.

Example
Given:
Verify NAND gate output for A=1, B=0
Also verify using De Morgan equivalence

Why this formula applies:
NAND output Y = (AB)' = A' + B'

Formula:
Y = (A.B)'

Substitution:
Y = (1.0)' = (0)' = 1

De Morgan verification:
Y = A' + B' = 0' + 1' = 1 + 0 = 1

Final Answer:
Y = 1
Both methods agree. NAND output is HIGH whenever at least one input is LOW.
Exam Tip: NAND and NOR are both universal gates. GATE often asks: how many NAND gates are needed to implement a NOT gate (1 gate, tie inputs), AND gate (2 gates), OR gate (3 gates). Memorize these counts. Also remember that XOR using NAND gates requires 4 NAND gates, a frequently tested implementation.

Loading lab...

Quick Revision

  • Boolean expression: Y = (AB)' = A' + B' (De Morgan equivalence).
  • Output is 0 only when ALL inputs are 1. Output is 1 for all other combinations.
  • NAND is a universal gate: NOT (1 NAND), AND (2 NANDs), OR (3 NANDs).
  • Standard IC: 7400 (Quad 2-input NAND, TTL, 5V). Most common IC in digital labs.
  • In CMOS, NAND is hardware-simpler than AND. NAND is the preferred physical gate.
  • XOR using NAND gates requires 4 NAND gates, a standard exam question.
  • Exam trap: NAND is NOT commutative in gate-count sense. Building OR from NAND takes 3 gates; building AND from NOR also takes 3 gates.

NAND Gate Quiz

Test your understanding of NAND as a universal gate and its use in implementing other logic functions.

Question 1 of 3

Q1.How many 2-input NAND gates are required to implement a 2-input AND gate?