Skip to content

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 && ∧ · ⋅

Wordsa AND b
Programminga && b
Mathematicala ∧ b
Algebraa·b

2 inputs: A AND B

A AND B
#ABf
0FALSEFALSEFALSE
1FALSETRUEFALSE
2TRUEFALSEFALSE
3TRUETRUETRUE
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
A AND B A AND B A B f AND
A AND B A AND B A B f AND

3 inputs: A AND B AND C

A AND B AND C
#ABCf
0FALSEFALSEFALSEFALSE
1FALSEFALSETRUEFALSE
2FALSETRUEFALSEFALSE
3FALSETRUETRUEFALSE
4TRUEFALSEFALSEFALSE
5TRUEFALSETRUEFALSE
6TRUETRUEFALSEFALSE
7TRUETRUETRUETRUE
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
A AND B AND C A AND B AND C A B C f AND
A AND B AND C A AND B AND C A B C f AND

4 inputs: A AND B AND C AND D

A AND B AND C AND D
#ABCDf
0FALSEFALSEFALSEFALSEFALSE
1FALSEFALSEFALSETRUEFALSE
2FALSEFALSETRUEFALSEFALSE
3FALSEFALSETRUETRUEFALSE
4FALSETRUEFALSEFALSEFALSE
5FALSETRUEFALSETRUEFALSE
6FALSETRUETRUEFALSEFALSE
7FALSETRUETRUETRUEFALSE
8TRUEFALSEFALSEFALSEFALSE
9TRUEFALSEFALSETRUEFALSE
10TRUEFALSETRUEFALSEFALSE
11TRUEFALSETRUETRUEFALSE
12TRUETRUEFALSEFALSEFALSE
13TRUETRUEFALSETRUEFALSE
14TRUETRUETRUEFALSEFALSE
15TRUETRUETRUETRUETRUE
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
A AND B AND C AND D A AND B AND C AND D A B C D f AND
A AND B AND C AND D A AND B AND C AND D A B C D f AND

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

Laws

Tools

See also

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.