The “AND” in “AND gate” might look like an abbreviation, but it is literally the English word “and”, rendered in capitals by convention. Its job in a circuit is to switch the circuit on or to divert it when two conditions are both in the “on”, “true” or “1” position.
A 2-input AND gate works on the following truth table, where 1 means “on” or where a voltage is present, and 0 means “off”.
Input A
| Input B
| Output
|
---|
0
| 0
| 0
|
1
| 0
| 0
|
0
| 1
| 0
|
1
| 1
| 1
|
Table 1: AND logic gate truth table
As you can see, there are four possible conditions here, but there’s only one condition where the output is a 1, and that’s when both A and B are also 1. If you imagine a circuit with two buttons and an AND gate linked to a lamp, the lamp will only come on if both buttons are pressed simultaneously. As soon as one button is released, or if both buttons are released, the lamp will switch off.
AND Gates with More than Two Inputs
All the examples above use just two inputs, or conditions, to determine whether the output is on or off. There are AND gates with three, four or more inputs, but still, all the inputs need to be in the 1 position for the gate to output a 1. The truth table for a 3-input AND gate looks like this:
Input A
| Input B
| Input C
| Output
|
---|
0
| 0
| 0
| 0
|
0
| 0
| 1
| 0
|
0
| 1
| 0
| 0
|
0
| 1
| 1
| 0
|
1
| 0
| 0
| 0
|
1
| 0
| 1
| 0
|
1
| 1
| 0
| 0
|
1
| 1
| 1
| 1
|
Table 2: 3-input AND gate truth table
There are eight potential input states from the three inputs, but only one (1, 1, 1) will result in the output also being a 1. You can probably guess what the truth tables for 4- and 5-input AND gates look like, so we won’t reproduce them here. Basically, though, all inputs need to be 1s for the output to be a 1.