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
Truth table (8 rows)
| # | A | B | C | f |
|---|---|---|---|---|
| 0 | FALSE | FALSE | FALSE | FALSE |
| 1 | FALSE | FALSE | TRUE | TRUE |
| 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 | FALSE |
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
- Boolean function: meaning and examples
- Notation (words, programming, mathematical, algebra): meaning and examples
- Operator precedence in Boolean logic: NOT, then AND, then XOR, then OR
- “=” is not a Boolean operator: use ↔ or compare the formulas
- Logic symbols: meanings, LaTeX, Unicode and how to type them
- Boolean expression to Python, SQL, SMT-LIB and LaTeX
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.