AND gate: truth table for 2, 3 and 4 inputs, symbol and expression
AND is TRUE only when every input is TRUE. The tables below show it with two, three and four inputs: one TRUE row each, always the last one, and a table that doubles in length with every input added.
With two inputs the table has four rows and a single TRUE result, on the row where A and B are both TRUE. With three inputs there are eight rows and still one TRUE row; with four, sixteen rows and one. In the engine's row order (row 0 is all FALSE and the first input is the most significant bit) that TRUE row is always the last. The engine reads A AND B AND C as one gate with three inputs rather than two nested gates, which is what the associative law allows and what the diagram draws.
The parser accepts AND, &&, ∧, the algebra dot · (and ⋅), and prints the formula in all four notations, with the dot form A·B for algebra. Writing two names side by side, AB, is not accepted as multiplication: the parser reads it as one name and offers to insert an operator, because silent multiplication is the source of too many misreadings.
AND is the operator of requirements: every condition must hold. The identity and domination laws say what a constant does to it (A AND TRUE is A, A AND FALSE is FALSE), idempotence removes a repeated input, and absorption removes a term that contains another. In code, && short-circuits (the right side is not evaluated when the left is false) while a single & is a bitwise operation in C, Java and JavaScript; the rules reference covers both. In English, “and” sometimes lists alternatives: “members and guests may enter” means member OR guest, not member AND guest.
Accepted spellings
AND && ∧ · ⋅
a AND ba && ba ∧ ba·b2 inputs: A AND B
| # | A | B | f |
|---|---|---|---|
| 0 | FALSE | FALSE | FALSE |
| 1 | FALSE | TRUE | FALSE |
| 2 | TRUE | FALSE | FALSE |
| 3 | TRUE | TRUE | TRUE |
Beginnerf is true exactly when both A and B are true.
In every other case, f is false.
About the operators:
- AND is true only when all of its parts are true.
Intermediatef is true exactly when both A and B are true.
In every other case, f is false.
Advancedf is true exactly when both A and B are true [conjunction ∧].
In every other case, f is false.
Formal notation: A ∧ B
3 inputs: A AND B AND C
| # | A | B | C | f |
|---|---|---|---|---|
| 0 | FALSE | FALSE | FALSE | FALSE |
| 1 | FALSE | FALSE | TRUE | FALSE |
| 2 | FALSE | TRUE | FALSE | FALSE |
| 3 | FALSE | TRUE | TRUE | FALSE |
| 4 | TRUE | FALSE | FALSE | FALSE |
| 5 | TRUE | FALSE | TRUE | FALSE |
| 6 | TRUE | TRUE | FALSE | FALSE |
| 7 | TRUE | TRUE | TRUE | TRUE |
Beginnerf is true exactly when all of A, B, and C are true.
In every other case, f is false.
About the operators:
- AND is true only when all of its parts are true.
Intermediatef is true exactly when all of A, B, and C are true.
In every other case, f is false.
Advancedf is true exactly when all of A, B, and C are true [conjunction ∧].
In every other case, f is false.
Formal notation: A ∧ B ∧ C
4 inputs: A AND B AND C AND D
| # | A | B | C | D | f |
|---|---|---|---|---|---|
| 0 | FALSE | FALSE | FALSE | FALSE | FALSE |
| 1 | FALSE | FALSE | FALSE | TRUE | FALSE |
| 2 | FALSE | FALSE | TRUE | FALSE | FALSE |
| 3 | FALSE | FALSE | TRUE | TRUE | FALSE |
| 4 | FALSE | TRUE | FALSE | FALSE | FALSE |
| 5 | FALSE | TRUE | FALSE | TRUE | FALSE |
| 6 | FALSE | TRUE | TRUE | FALSE | FALSE |
| 7 | FALSE | TRUE | TRUE | TRUE | FALSE |
| 8 | TRUE | FALSE | FALSE | FALSE | FALSE |
| 9 | TRUE | FALSE | FALSE | TRUE | FALSE |
| 10 | TRUE | FALSE | TRUE | FALSE | FALSE |
| 11 | TRUE | FALSE | TRUE | TRUE | FALSE |
| 12 | TRUE | TRUE | FALSE | FALSE | FALSE |
| 13 | TRUE | TRUE | FALSE | TRUE | FALSE |
| 14 | TRUE | TRUE | TRUE | FALSE | FALSE |
| 15 | TRUE | TRUE | TRUE | TRUE | TRUE |
Beginnerf is true exactly when all of A, B, C, and D are true.
In every other case, f is false.
About the operators:
- AND is true only when all of its parts are true.
Intermediatef is true exactly when all of A, B, C, and D are true.
In every other case, f is false.
Advancedf is true exactly when all of A, B, C, and D are true [conjunction ∧].
In every other case, f is false.
Formal notation: A ∧ B ∧ C ∧ D
The common slip
Translating an English “and” that lists who qualifies into a logical AND. “Students and seniors get the discount” admits either group, so the rule is student OR senior; student AND senior would require a person to be both, and the table shows it true on one row only.
Questions
Can AND take more than two inputs?
Yes. A AND B AND C AND D is one gate with four inputs; the parser does not need brackets inside a chain of the same operator, and the four-input table has sixteen rows with one TRUE result.
Why is A AND B OR C read as (A AND B) OR C?
Because AND binds before OR, the same convention as multiplication before addition in arithmetic. Write A AND (B OR C) when you mean the other grouping; the precedence page shows that the two differ.
Related
Guides
Worked examples that use it
- Entry rule: (member OR invited) AND NOT banned, checked every way
- Entry rule slip: member OR (invited AND NOT banned) and the case that differs
- Majority of three (2-out-of-3 voting): truth table, K-map and NAND form
- Exactly one of three: why XOR is the wrong tool
- At most one of three: mutual exclusion
- Half adder sum: A XOR B
Laws
- Identity law of Boolean algebra: A AND TRUE = A, A OR FALSE = A
- Null law (domination): A AND FALSE = FALSE, A OR TRUE = TRUE
- Idempotent law: A AND A = A, A OR A = A
- Complement law: A AND NOT A = FALSE, A OR NOT A = TRUE
- Absorption law: A OR (A AND B) = A, with proof
- De Morgan's laws: NOT (A AND B) = NOT A OR NOT B, with proof and examples
Tools
- Truth table generator: any Boolean expression, up to 12 variables, with intermediate columns
- Logic circuit generator: Boolean expression to gate diagram (SVG)
See also
- Identity law of Boolean algebra: A AND TRUE = A, A OR FALSE = A
- Null law (domination): A AND FALSE = FALSE, A OR TRUE = TRUE
- Idempotent law: A AND A = A, A OR A = A
- Absorption law: A OR (A AND B) = A, with proof
- Operator precedence in Boolean logic: NOT, then AND, then XOR, then OR
- AB is one name, not A AND B: implicit multiplication
- Single & and | are bitwise in most languages
- Lesson 1: NOT, AND, OR: the basic operators (beginner, 10 min)
Operators and gates
Generated from the Tangibool engine, semantics tangibool-semantics/1, engine 1.0.0, build . Every table, map, simplification and verdict on these pages was computed by the Tangibool engine when the site was built, and every claim was re-checked by the same exact checker the app uses. Limits are stated where they apply. © 2026 Foreranger LTD.