7. The logic AND gate¶
The AND logic gate has two or more inputs and one output. Its symbol is the following:
The output has a logic high value (1) if all its inputs have a logic high value (1). That is, if input A and input B are high, the output will be high. Hence the name AND in English.
The logical AND function is represented by multiplication, so that the output of the gate will be the logical multiplication of the inputs:
If both inputs are worth one, the output will be worth one, but if either input is worth zero, the output will be worth zero.
The truth table of the logical AND function is as follows:
The NAND logic gate¶
The NAND logic gate has two or more inputs and one output. Its symbol is the following:
The output will be the same as that of an AND gate, but inverted. That is to say that the output will only be worth zero when all the inputs are worth one.
The NAND logic function is represented by negated multiplication, so that the output of the gate will be the logical multiplication of the inputs that is finally inverted:
The truth table of the NAND logic function is as follows:
Simulation¶
In the following simulation we can see the operation of the AND logic gate and, below, the operation of the NAND logic gate.
Exercises¶
- Draw the AND logic gate symbol, its logic function, and its truth table.
- Draw the NAND logic gate symbol, its logic function, and its truth table.
- Check with the simulator that the truth table of the AND function and that the truth table of the NAND function are correct.
- In the simulator, add an inverting gate to the output of the AND gate and check that its response is the same as that of the NAND gate.
- Draw a three-input AND logic gate and its truth table.