Navigation

Authors

Useful programs

Logic Gates Extras

 

AND/NAND Gate

 

The AND and NAND gates are commonly used gates that have two or more inputs and a single output. They perform opposite operations.

 

AND Gate

The function of an AND gate is to multiply all the values of the input, then output the product. This means that if either input is false (0) then the output is false; so the output is only true (1) when both inputs are true.

The Boolean equation of the logic gate is:

X = A * B

Based on this equation we can find out all possible results of different outputs. This gate can have two or more inputs. Below is the truth table that shows the outputs for all the different input combinations for a two-input AND gate.

The truth table and Venn diagram below represent the different inputs and outputs of the gate. For more information on truth tables and Venn diagrams, click here.

Truth Table: AND Gate - 2 Inputs
Input Output
0 0 0
0 1 0
1 0 0
1 1 1

Below, we have provided GIF animations to represent the function of the gate.

AND Gate: Input = 00 AND Gate: Input = 01



AND Gate: Input = 10 AND Gate: Input = 11

Application

AND gates can be used for a variety of different application. One practical use is in a factory. In order to keep the workers safe, an AND gate is used to operate machinery. When a worker wants to turn on a cutting machine for example, he/she needs to put both his/her hands on two separate buttons. The buttons are linked by an AND gate so it will not turn on unless both buttons are pressed, or at (1). This makes sure the workers hands are away from the cutting machine.





Above is the traditional symbol that represents an AND gate.


Above is the International Electrotechnical Commission (IEC) symbol for the gate.
 
 

NAND Gate

A NAND gate, also known as a Negated AND gate, does the function of the AND gate and then negates it. This means that if the result was one it would change it to zero and vice versa. A NAND gate also has two or more inputs but only a single output. This negated function is done on the AND gate by putting a small circle at the end of it. As you can see to the right, the symbol is identical to the AND gate but with a little circle.

A NAND gate is different than the rest because once you can create a NAND gate you can create any other kind of gate using only NAND gates.

The Boolean equation of the logic gate is:

*The line above the A*B represents a "not" or a negation

Based on this equation we can find out all possible results of different outputs. This gate can have two or more inputs. Below is the truth table that shows the outputs for all the different input combinations for a two-input NAND gate.

The truth table and Venn diagram below represent the different inputs and outputs of the gate. For more information on truth tables and Venn diagrams, click here.

Truth Table: NAND Gate - 2 Inputs
Input Output
0 0 1
0 1 1
1 0 1
1 1 0

Below, we have provided GIF animations to represent the function of the gate.

NAND Gate: Input = 00 NAND Gate: Input = 01



NAND Gate: Input = 10 NAND Gate: Input = 11

Application

A NAND gate can be used in a variety of different applications. One example of a NAND gate in use is in a car door alarm. The car door alarm will only signal when one or both doors are open. For example if any door is open (0) then the result will be one since anything multiplied by 0 is 0 and the gate is negated. Only when both doors are closed (1 and 1) will the alarm turn off to 0.





Above is the traditional symbol that represents a NAND gate.


Above is the International Electrotechnical Commission (IEC) symbol for the gate.