AND Gate Explained: Truth Table and Simulator
An AND gate outputs 1 only when every input is 1. Use the truth table and interactive mini-demo to test the Boolean expression Y = A · B.
How an AND gate works
An AND gate checks whether all of its inputs are true at the same time. For two binary inputs, A and B, the output Y is 1 only for the input pair 1,1; every other pair produces 0. Its Boolean expression is Y = A · B, read as “A AND B”. The dot means logical conjunction, not ordinary arithmetic multiplication, although the result happens to match multiplying binary values. AND is a basic combinational logic gate: its output depends on the current inputs and it stores no memory.
The truth table lists all four possible input combinations, so it is a complete test of the gate. If either input is 0, the output must be 0. When both inputs are 1, the output becomes 1. AND gates can also have more than two inputs; in that case, every input must be 1 before the output is 1. A chain of two-input AND gates can represent the same condition when a circuit library has no larger gate.
Where AND gates are used
Digital circuits use AND logic whenever several conditions must all be satisfied. A system might enable a device only when a power signal and a safety signal are both active. In a binary half adder, A AND B produces the carry bit, because a carry occurs only when both input bits are 1. The same idea appears in instruction control, data masking, and permission checks: one signal can pass only while the other signal allows it.
In a logic circuit simulator, place an AND gate, connect two input pads, and toggle each input through 0 and 1. Compare the live output with the truth table to check your wiring. This small experiment makes the difference between a gate symbol and its behavior concrete, and it is a useful first step before building adders or larger digital logic systems.
AND truth table
Boolean expression: Y = A · B
| A | B | Y |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Use the interactive controls on this page to toggle the inputs and see the output change.
Frequently asked questions
When does an AND gate output 1?
A two-input AND gate outputs 1 only when both inputs are 1. If either input is 0, the output is 0.
What is the Boolean expression for an AND gate?
For inputs A and B, the Boolean expression is Y = A · B. The dot means logical AND.