Skip to content

Boolean expression: meaning and examples

A Boolean expression is a formula built from variables, the constants TRUE and FALSE, and operators such as AND, OR and NOT, with parentheses for grouping. It denotes a Boolean function and evaluates to one value on each row.

Expressions are syntax: strings with a grammar, parsed into a tree whose leaves are variables or constants and whose inner nodes are operators. The engine's word notation writes the operators as AND, OR, NOT, XOR, -> and <->, with NAND(A, B) and NOR(A, B) as named forms and Σm(…) for a minterm list; the precedence rules say that NOT binds tightest and AND before OR, so parentheses are needed whenever the intended grouping differs. Two expressions are equivalent when they denote the same function.

The artefact on this page is NOT (A OR B) AND C, read as “A or B does not hold, and C is true”: the parentheses make the negation cover the whole OR, and the AND is applied last. The 8-row table reads true on row 1 only, A = FALSE, B = FALSE, C = TRUE, which is also the witness of the satisfiable check. The tautology check is violated with the counterexample A = FALSE, B = FALSE, C = FALSE. Without the parentheses, NOT A OR B AND C is a different expression and function.

Expressions are what people write: a guard in code, a WHERE clause, a formula in a cell, a premise in an essay. Everything the engine does begins by parsing one, and the exports to Python, SQL, SMT-LIB and LaTeX are translations of the same tree into other grammars. The term is confused with a Boolean function (the meaning rather than the text) and with a Boolean value, the single TRUE or FALSE an expression yields on one row.

Example

f := NOT (A OR B) AND C · output

Exact checks

Always true (tautology)? No Counterexample: A = F, B = F, C = F · Exhaustively checked and solver cross-checked · 1 rows
Always false (contradiction)? No Counterexample: A = F, B = F, C = T · Exhaustively checked and solver cross-checked · 2 rows
Can be true? Yes Example assignment: A = F, B = F, C = T · Exhaustively checked and solver cross-checked · 2 rows

Truth table (8 rows)

Boolean expression: meaning and examples
#ABCf
0FALSEFALSEFALSEFALSE
1FALSEFALSETRUETRUE
2FALSETRUEFALSEFALSE
3FALSETRUETRUEFALSE
4TRUEFALSEFALSEFALSE
5TRUEFALSETRUEFALSE
6TRUETRUEFALSEFALSE
7TRUETRUETRUEFALSE

Plain-language reading

Beginnerf is true exactly when both of the following hold:
1. the following condition does not hold:
1.1. at least one of A or B is true (both may be true)
2. C is true
In every other case, f is false.
About the operators:
- AND is true only when all of its parts are true.
- NOT reverses a value: true becomes false and false becomes true.
- OR is inclusive: it is true when at least one part is true, including when several are.
Intermediatef is true exactly when both of the following hold:
1. the following condition does not hold:
1.1. at least one of A or B is true (both may be true)
2. C is true
In every other case, f is false.
Advancedf is true exactly when both of the following hold [conjunction ∧]:
1. the following condition does not hold [negation ¬]:
1.1. at least one of A or B is true (both may be true) [inclusive disjunction ∨]
2. C is true
In every other case, f is false.
Formal notation: ¬(A ∨ B) ∧ C

The common slip

Dropping the parentheses and trusting precedence. NOT (A OR B) AND C and NOT A OR B AND C read alike aloud and differ on the table; the second is (NOT A) OR (B AND C). When the grouping carries meaning, write the parentheses even where the grammar would not require them.

Questions

Is A = B a Boolean expression?

Not in the engine's notation, where equality is not an operator; the biconditional A <-> B expresses “same value”. Languages differ here, and the pitfall page on = and == shows how the same characters mean assignment, comparison or nothing at all.

Related

Guides

See also

Glossary

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.