NAND Logic Gate
When we combine AND logic gate with NOT logic gate, we get NAND logic gate. It means AND+ NOT = NAND. First, we get the output of AND logic gate and then apply the NOT gate, which generates NAND logic gate.

- NAND logic gate generates output 1 (HIGH) when atleast one input is 0 (LOW).
- NAND logic gate generates output 0 (LOW) when all inputs are 1 (HIGH).
Keep in mind, AND and NAND are opposite in terms of output.
NAND Logic Gate Boolean Expression
The Boolean expression of NAND logic Gate is given below

where
- A, B are the input variables
- X is the output variable
- “.” is the operator for AND Gate
- bar “-” represents the NOT operation.
NAND Logic Gate Symbols
Here are standard diagrams that show the symbol of NAND logic gate. The number of inputs to a NAND logic gate can be different according to the requirement
NAND Logic Gate Symbol for 2 Inputs
In the following NAND gate diagram, A and B are two inputs, and X is the output

NAND Gate Symbol for 3 Inputs
In the following NAND gate diagram, A, B, and C are the inputs, and X is the output

NAND Logic Gate Symbol for 4 Inputs using 3 NAND Gates
In the following NAND gate diagram, A, B, C, and D are the inputs, and X is the output

NAND Logic Gate Symbol for 5 Inputs using 3 NAND Gates
In the following NAND gate diagram, A, B, C, D, and E are the inputs, and X is the output

NAND Gate Symbol for 6 Inputs using 3 NAND Gates
In the following NAND gate diagram, A, B, C, D, E, and F are the inputs, and X is the output

NAND Gate Symbol for 7 Inputs using 5 NAND Gates
In the following NAND gate diagram, A, B, C, D, E, F, and G are the inputs, and X is the output

NAND Gate Symbol for 7 Inputs using 1 NAND Gate
In the following NAND gate diagram, A, B, C, D, E, F, and G are the inputs, and X is the output

| Important:
There is a physical limit on the number of inputs a single gate can directly support. This depends on the technology and the specific IC. If more inputs are needed, multiple gates can be combined. |
NAND Logic Gate Equivalent Circuit
NAND logic gate with two switches A and B with lamp for output is given below
Case 01: When A = 0 and B= 0, Lamp will ON because NAND output is 1.

Case 02: When A = 0 and B= 1, Lamp will ON because NAND output is 1

Case 03: When A = 1 and B= 0, Lamp will ON because NAND output is 1.

Case: 04: When A = 1 and B= 1, Lamp will OFF because NAND output is 0.

NAND Gate in Terms of Transistors
A transistor-based NAND gate uses two or more NPN transistors connected in parallel. The output becomes HIGH (1) if any single transistor is OFF. If all transistor turns ON, it pulls the output HIGH (1).
Case 01: When A = 0 and B= 0, Transister contains no base current; so, the output is 1.

Case 02: When A = 1 and B= 0, Transistor B contains no current at the base, So, output = 1

Case 03: When A = 0 and B= 1, Transistor A contains no current at the base, So, output = 1

Case 04: When A = 1 and B= 1, As all Transistor contains current at the base, So, output = 0

NAND Logic Gate Truth Table
The truth table represents all possible input combinations and their corresponding outputs for any logic gate. NAND Logic Gate truth tables for different numbers of inputs are given below
|
The total number of possible input combinations in a truth table is calculated through 2ⁿ formula, where n represents the number of inputs.
|
NAND Logic Gate Truth Table for 2 inputs
NAND Logic Gate Truth Table for two inputs (A, B) is given below
NAND Logic Gate Truth Table for 3 inputs
NAND Logic Gate Truth Table for three inputs (A, B, C) is given below
NAND Logic Gate Truth Table for 4 inputs
NAND Logic Gate Truth Table for four inputs (A, B, C, D) is given below
NAND Gate as a Universal Gate
A NAND gate is called a universal gate because it can be used to implement all the basic logic gates, such as NOT, OR, and AND. By combining NAND gates in different ways, other gates such as NOR, XOR, and XNOR can also be constructed.
OR Gate Using NAND Gates
The following diagram of using NAND Logic gates produces the exact output that is produced by a 2-input OR Gate. It is done through NAND Gate.
AND Gate Using NAND Gates
The following diagram of using NAND Logic gates produces the exact output that is produced by a 2-input AND Gate. It is done through NAND Gate.
NOT Gate Using NAND Gates
The following diagram of using NAND Logic gates produces the exact output that is produced by a NOT Gate. It is done through NAND Gate.
NOR Gate Using NAND Gates
The following diagram of using NAND Logic gates produces the exact output that is produced by a 2-input NOR Gate. It is done through NAND Gate.
XOR Gate Using NAND Gates
The following diagram of using NAND Logic gates produces the exact output that is produced by a 2-input XOR Gate. It is done through NAND Gate.
XNOR Gate Using NAND Gates
The following diagram of using NAND Logic gates produces the exact output that is produced by a 2-input XNOR Gate. It is done through NAND Gate.