Skip to content

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 || ∨ +

Wordsa OR b
Programminga || b
Mathematicala ∨ b
Algebraa + b

2 inputs: A OR B

A OR B
#ABf
0FALSEFALSEFALSE
1FALSETRUETRUE
2TRUEFALSETRUE
3TRUETRUETRUE
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
A OR B A OR B A B f OR
A OR B A OR B A B f OR

3 inputs: A OR B OR C

A OR B OR C
#ABCf
0FALSEFALSEFALSEFALSE
1FALSEFALSETRUETRUE
2FALSETRUEFALSETRUE
3FALSETRUETRUETRUE
4TRUEFALSEFALSETRUE
5TRUEFALSETRUETRUE
6TRUETRUEFALSETRUE
7TRUETRUETRUETRUE
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
A OR B OR C A OR B OR C A B C f OR
A OR B OR C A OR B OR C A B C f OR

4 inputs: A OR B OR C OR D

A OR B OR C OR D
#ABCDf
0FALSEFALSEFALSEFALSEFALSE
1FALSEFALSEFALSETRUETRUE
2FALSEFALSETRUEFALSETRUE
3FALSEFALSETRUETRUETRUE
4FALSETRUEFALSEFALSETRUE
5FALSETRUEFALSETRUETRUE
6FALSETRUETRUEFALSETRUE
7FALSETRUETRUETRUETRUE
8TRUEFALSEFALSEFALSETRUE
9TRUEFALSEFALSETRUETRUE
10TRUEFALSETRUEFALSETRUE
11TRUEFALSETRUETRUETRUE
12TRUETRUEFALSEFALSETRUE
13TRUETRUEFALSETRUETRUE
14TRUETRUETRUEFALSETRUE
15TRUETRUETRUETRUETRUE
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
A OR B OR C OR D A OR B OR C OR D A B C D f OR
A OR B OR C OR D A OR B OR C OR D A B C D f OR

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

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.