Notation (words, programming, mathematical, algebra): meaning and examples
Notation is the set of symbols used to write Boolean formulas: words (AND, OR, NOT), programming operators (&&, ||, !), mathematical logic (∧, ∨, ¬) or Boolean algebra (·, +, overbar). The engine reads and writes the word form.
Four families coexist. Word notation, used throughout this reference, writes A AND NOT B, with -> for the conditional, <-> for the biconditional and XOR spelled out; it is unambiguous and readable aloud. Programming languages write a && !b in C, Java and JavaScript, a and not b in Python, a AND NOT b in SQL. Mathematical logic writes A ∧ ¬B with → and ↔ for the conditionals. Boolean algebra writes A·B′ or AB̄, with + for OR and juxtaposition for AND. Precedence rules differ between families, which is where mistakes come from.
The artefact on this page is (A AND NOT B) OR C, in other notations (a && !b) || c, (A ∧ ¬B) ∨ C and AB′ + C. Whatever the spelling, the table is the same: true on rows 1, 3, 4, 5 and 7. The satisfiable check holds with the witness A = FALSE, B = FALSE, C = TRUE, and the tautology check is violated with the counterexample A = FALSE, B = FALSE, C = FALSE. The parentheses are redundant, since AND binds tighter than OR, but they make the grouping visible.
Notation matters at every boundary: a rule agreed in words must be typed into a language, exported to SQL or SMT-LIB, or typeset in LaTeX, and each crossing is a chance to change meaning. The engine exports a formula to Python, SQL, SMT-LIB, LaTeX, CSV and Markdown from one parsed tree. The term is confused with semantics (what the symbols mean, which does not change) and with the specific symbol choices of one textbook, of which there are many.
Example
f := (A AND NOT B) OR 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 | TRUE |
| 4 | TRUE | FALSE | FALSE | TRUE |
| 5 | TRUE | FALSE | TRUE | TRUE |
| 6 | TRUE | TRUE | FALSE | FALSE |
| 7 | TRUE | TRUE | TRUE | TRUE |
Plain-language reading
Beginnerf is true exactly when at least one of the following holds (both may hold):
1. A is true and B is false
2. C is 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.
- AND is true only when all of its parts are true.
- NOT reverses a value: true becomes false and false becomes true.
Intermediatef is true exactly when at least one of the following holds (both may hold):
1. A is true and B is false
2. C is true
In every other case, f is false.
Advancedf is true exactly when at least one of the following holds (both may hold) [inclusive disjunction ∨]:
1. A is true and B is false [conjunction ∧]
2. C is true
In every other case, f is false.
Formal notation: (A ∧ ¬B) ∨ C
The common slip
Carrying the precedence of one notation into another. Algebra readers expect AND before OR, as in AB + C; some languages give & and | the same precedence, and a caret ^ is XOR in C but exponentiation elsewhere. The pitfall pages on caret, single ampersand and precedence across languages cover the cases.
Questions
Why does the engine use words instead of symbols?
Because words are unambiguous across keyboards and languages, read aloud correctly, and avoid the symbol clashes between families. The symbols page lists the equivalents in each notation, and the exporter writes the symbolic forms when a target needs them.
Related
See also
- Logic symbols: meanings, LaTeX, Unicode and how to type them
- Operator precedence in Boolean logic: NOT, then AND, then XOR, then OR
- Precedence differs across languages: not a == b in Python
- ^ means XOR in C, Java and Python, not AND or power
- Boolean expression to Python, SQL, SMT-LIB and LaTeX
- Boolean expression: meaning and examples
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.