The AND gate
The AND gate is one of the simplest two-input gates: its output is 1 only if both inputs are 1. If just one input is 0, the output drops to 0.
In real life
Think of a security door with two locks: it only opens if the first AND the second are turned. Or a bank vault that needs two keys turned at the same time. Inside a computer, the AND gate is everywhere: checking that two conditions are true, letting a signal through only when a clock allows it, or working out the carry in an addition.
The truth table
| A | B | S |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
The symbol
The classic (American) symbol is a D shape: a flat side on the left for the inputs, a half circle on the right for the output. The European symbol is a rectangle with the sign & inside. In electronics, the 74HC08 integrated circuit contains four AND gates.
Your turn to play
Place the right gate and flip the inputs: when every row of the table is green, the lamp lights up.
Your turn: 4 questions
Answer and see straight away whether you were right. You need 3 right answers out of 4 to pass the page. Your score stays on this device, nothing is sent.
Frequently asked questions
What is an AND gate used for?
To check that several conditions are true at the same time. The output is 1 only if all the inputs are 1.
What is the truth table of the AND gate?
For two inputs A and B: 00 gives 0, 01 gives 0, 10 gives 0, 11 gives 1. Only one row out of four gives 1.
Can an AND gate have more than two inputs?
Yes. A three-input AND gate outputs 1 only if all three inputs are 1. The principle does not change.
The other gates: The OR gate · The NOT gate · The XOR gate · The NAND and NOR gates · The truth table · All the pages