A NAND gate is a combination of an inverter and an AND gate. It is called a NAND gate from the NOT-AND function it performs. The NAND gate is the most commonly used logic function. This is because it can be used to construct an AND gate, OR gate, inverter, or any combination of these functions.
below is the truth table for a two-input NAND gate. Notice that the output of the NAND gate is the complement of the output of an AND gate. Any 0 in the input yields a 1 output.
NAND gates are the most widely available gates on the market. The availability and flexibility of the NAND gate allows it to be used for other types of gates. below Figure shows how a two-input NAND gate can be used to generate other logic functions.