What is a NAND Gate? Symbol, Truth Table, Working, Boolean Expression & Applications

Introduction

A NAND gate is one of the most widely used digital logic gates in electronic circuits. The term NAND stands for NOT-AND, which means that it performs the opposite operation of an AND gate. The output of a NAND gate normally remains at logic level 1 (HIGH). It switches to logic level 0 (LOW) only when all of its inputs are at logic level 1. In other words, a NAND gate is the complementary or inverted form of an AND gate. Because NAND gates can be combined to create all other basic logic gates, they are commonly known as universal logic gates.

What is a NAND Gate?

A NAND gate is a digital logic gate that produces the inverse output of an AND gate. It gives a LOW output only when all of its inputs are HIGH. For every other input combination, the output remains HIGH. For a two-input NAND gate, the operation can be described as follows:

ADVERTISEMENT

“If both A and B are true, then Q is NOT true.”

The Boolean expression of a NAND gate is the complement of the AND operation.

Q = (A · B)̅

Here, the line above the Boolean expression represents the NOT or logical negation operation.

Logic NAND Gate Equivalence

The Boolean operation of a NAND gate is the complement of the logical AND operation. First, the input values are processed through an AND operation, and then the output is inverted. Therefore, the output of a NAND gate can be expressed as:

Q = (A · B)̅

This means that the output Q is LOW only when both A and B are HIGH.

Transistor NAND Gate

A simple two-input NAND gate can be constructed using resistor-transistor logic (RTL) with two transistors connected in series. When both input transistors are turned ON, the output switches LOW. However, if either transistor is turned OFF, the output remains HIGH. This arrangement produces the required NAND logic function. The symbol of a NAND gate is similar to that of an AND gate, but it includes a small circle at the output. This circle is known as an inversion bubble and represents the NOT operation.

The Digital Logic NAND Gate

A NAND gate can be designed with two or more inputs. Its output remains HIGH unless all inputs are HIGH simultaneously.

2-Input NAND Gate

A two-input NAND gate has two inputs, A and B, and one output, Q.

Boolean Expression:

Q = (A · B)̅

The operation can be read as:

A AND B gives NOT Q.

2-Input NAND Gate Truth Table

A B Q = (A · B)̅
0 0 1
0 1 1
1 0 1
1 1 0

The table shows that the output becomes LOW only when both inputs are HIGH.

3-Input NAND Gate

A three-input NAND gate has three inputs: A, B, and C. The output is HIGH unless all three inputs are HIGH.

Boolean Expression:

Q = (A · B · C)̅

The operation can be read as:

A AND B AND C gives NOT Q.

3-Input NAND Gate Truth Table

A B C Q = (A · B · C)̅
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0

4-Input NAND Gate

A four-input NAND gate contains four inputs: A, B, C, and D. Its output becomes LOW only when all four inputs are HIGH.

Boolean Expression:

Q = (A · B · C · D)̅

Like the AND function, the NAND function can have any number of independent inputs. Commercially available NAND gate ICs commonly provide 2-input, 3-input, and 4-input configurations. If additional inputs are required, multiple conventional NAND gates can be combined to create NAND gates with more inputs.

When an input of a NAND gate is not used, it can be held at a suitable logic level, depending on the circuit requirements. In some applications, unused inputs may be connected HIGH through appropriate pull-up resistors.

NAND Gate Symbol and Sheffer Stroke

The NAND gate function is sometimes known as the Sheffer Stroke Function. It can be represented by a vertical bar or an upward arrow operator.

For example:

A NAND B = A | B

or

A NAND B = A ↑ B

The Universal NAND Gate

The NAND gate is known as a universal logic gate because it can be used to construct all other basic logic gate functions. By connecting NAND gates in different combinations, the three fundamental logic functions can be created:

Due to this versatility, NAND gates form the basis of many practical digital logic circuits.

Various Logic Gates Using NAND Gates

In addition to AND, OR, and NOT gates, several other logic functions can also be created using only NAND gates.

This ability to implement different logic functions using a single gate type makes the NAND gate one of the most important and frequently used gates in digital electronics.

Conclusion

A NAND gate is the inverted form of an AND gate and produces a LOW output only when all of its inputs are HIGH. For all other input combinations, the output remains HIGH. NAND gates are available with different numbers of inputs, including 2-input, 3-input, and 4-input configurations. Their most important feature is their ability to create other logic gates and logic functions using only NAND gate combinations. Because of this versatility, the NAND gate is called a universal gate and is widely used in digital electronics, logic circuits, computers, processors, and other electronic systems.