OR gate: truth table for 2, 3 and 4 inputs, inclusive or explained
OR is inclusive: it is TRUE when at least one input is TRUE, including when several are. Its only FALSE row is the one where every input is FALSE, which is row 0 in every table below.
With two inputs, three of the four rows are TRUE; with three inputs, seven of eight; with four, fifteen of sixteen. The single FALSE row is always the first, where all inputs are FALSE. The engine's plain-language reading says it directly: the output is true when at least one of the parts is true, and both may hold. As with AND, a chain A OR B OR C is one gate with three inputs.
The parser accepts OR, ||, ∨ and the algebra plus +, and prints A + B in the algebra notation; a single | is rejected because in C, Java and JavaScript it is a bitwise operator. OR binds looser than AND and XOR, so A OR B AND C is read as A OR (B AND C); add brackets whenever you mean (A OR B) AND C, and the precedence page shows the row on which the two readings part.
In everyday language “or” is often exclusive (“tea or coffee”), and in logic it is not: A OR B is also TRUE when both hold. When you need “one but not both”, that is XOR, and when you need “exactly one of three” it is neither OR nor a chain of XOR. The pitfall pages cover both, and the lesson on the basic operators walks through the inclusive reading with the entry rule (member OR invited) AND NOT banned.
Accepted spellings
OR || ∨ +
a OR ba || ba ∨ ba + b2 inputs: A OR B
| # | A | B | f |
|---|---|---|---|
| 0 | FALSE | FALSE | FALSE |
| 1 | FALSE | TRUE | TRUE |
| 2 | TRUE | FALSE | TRUE |
| 3 | TRUE | TRUE | TRUE |
Beginnerf is true exactly when at least one of A or B is true (both may be true).
In every other case, f is false.
About the operators:
- OR is inclusive: it is true when at least one part is true, including when several are.
Intermediatef is true exactly when at least one of A or B is true (both may be true).
In every other case, f is false.
Advancedf is true exactly when at least one of A or B is true (both may be true) [inclusive disjunction ∨].
In every other case, f is false.
Formal notation: A ∨ B
3 inputs: A OR B OR C
| # | A | B | C | f |
|---|---|---|---|---|
| 0 | FALSE | FALSE | FALSE | FALSE |
| 1 | FALSE | FALSE | TRUE | TRUE |
| 2 | FALSE | TRUE | FALSE | TRUE |
| 3 | FALSE | TRUE | TRUE | TRUE |
| 4 | TRUE | FALSE | FALSE | TRUE |
| 5 | TRUE | FALSE | TRUE | TRUE |
| 6 | TRUE | TRUE | FALSE | TRUE |
| 7 | TRUE | TRUE | TRUE | TRUE |
Beginnerf is true exactly when at least one of A, B, or C is true (several may be true).
In every other case, f is false.
About the operators:
- OR is inclusive: it is true when at least one part is true, including when several are.
Intermediatef is true exactly when at least one of A, B, or C is true (several may be true).
In every other case, f is false.
Advancedf is true exactly when at least one of A, B, or C is true (several may be true) [inclusive disjunction ∨].
In every other case, f is false.
Formal notation: A ∨ B ∨ C
4 inputs: A OR B OR C OR D
| # | A | B | C | D | f |
|---|---|---|---|---|---|
| 0 | FALSE | FALSE | FALSE | FALSE | FALSE |
| 1 | FALSE | FALSE | FALSE | TRUE | TRUE |
| 2 | FALSE | FALSE | TRUE | FALSE | TRUE |
| 3 | FALSE | FALSE | TRUE | TRUE | TRUE |
| 4 | FALSE | TRUE | FALSE | FALSE | TRUE |
| 5 | FALSE | TRUE | FALSE | TRUE | TRUE |
| 6 | FALSE | TRUE | TRUE | FALSE | TRUE |
| 7 | FALSE | TRUE | TRUE | TRUE | TRUE |
| 8 | TRUE | FALSE | FALSE | FALSE | TRUE |
| 9 | TRUE | FALSE | FALSE | TRUE | TRUE |
| 10 | TRUE | FALSE | TRUE | FALSE | TRUE |
| 11 | TRUE | FALSE | TRUE | TRUE | TRUE |
| 12 | TRUE | TRUE | FALSE | FALSE | TRUE |
| 13 | TRUE | TRUE | FALSE | TRUE | TRUE |
| 14 | TRUE | TRUE | TRUE | FALSE | TRUE |
| 15 | TRUE | TRUE | TRUE | TRUE | TRUE |
Beginnerf is true exactly when at least one of A, B, C, or D is true (several may be true).
In every other case, f is false.
About the operators:
- OR is inclusive: it is true when at least one part is true, including when several are.
Intermediatef is true exactly when at least one of A, B, C, or D is true (several may be true).
In every other case, f is false.
Advancedf is true exactly when at least one of A, B, C, or D is true (several may be true) [inclusive disjunction ∨].
In every other case, f is false.
Formal notation: A ∨ B ∨ C ∨ D
The common slip
Assuming OR excludes the case where both inputs are TRUE. The two-input table has three TRUE rows, and the row A = TRUE, B = TRUE is one of them. A rule that must reject that case needs A XOR B, or an explicit NOT (A AND B).
Questions
How do I say “exactly one of A and B”?
With A XOR B, which is TRUE only when the two differ. For three or more options, write the cases out, as the worked example “exactly one of three” does; a chain of XOR means odd parity instead.
Is A OR TRUE always TRUE?
Yes: that is the domination law for OR. A TRUE input decides an OR on its own, just as a FALSE input decides an AND, and the simplifier removes the rest of the expression in one step.
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
- Full adder carry-out: (A AND B) OR (Cin AND (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
- XOR gate: truth table for 2, 3 and 4 inputs (odd parity, not “exactly one”)
- Operator precedence in Boolean logic: NOT, then AND, then XOR, then OR
- Inclusive vs exclusive or (OR vs XOR), with truth table
- “A or B and C”: the grouping ambiguity and how to resolve it
- Null law (domination): A AND FALSE = FALSE, A OR TRUE = TRUE
- Exactly one of three: why XOR is the wrong tool
- 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.