Skip to content
BetterDL

Boolean notation

Also called: notation, prime notation, bar notation, overbar, long bar, Boolean symbols

The symbols used to write Boolean expressions. This course uses AB for AND, A + B for OR, and a bar (typed ') for NOT.

The same logic is written in different ways in different books and fields. This course uses:

  • AND: letters side by side, AB, or a dot, A·B.
  • OR: a plus sign, A + B.
  • NOT: a bar over what it covers. Since you can't type a bar, answer boxes use a prime after the letter: A'. A long bar over a group is typed with brackets: is (AB)'.
  • XOR: A ⊕ B.
  • True and false: 1 and 0.

Other notations you may meet:

  • Discrete maths: A ∧ B, A ∨ B, ¬A, with T and F.
  • Programming: a && b, a || b, !a (or and, or, not).
  • Some books: A̅ or ~A for NOT.

The length of a bar matters. (two short bars) and (one long bar) are different functions. A bar works like brackets: everything under it is evaluated first, then flipped. See operator precedence and complement.

Worked examples

Example

Translating discrete-maths notation

Rewrite ¬(p ∧ q) ∨ r in this course's notation, using A, B, C for p, q, r.

  1. 1.

    ∧ is AND, so p ∧ q becomes .

  2. 2.

    ¬ in front of a bracket is a long bar: , typed (AB)'.

  3. 3.

    ∨ is OR: .

  4. 4.

    The precedence is the same in every notation: NOT, AND, then OR.

Example

Short bars versus a long bar

Evaluate and at A = 1, B = 0.

  1. 1.

    : each bar covers one letter, so 0 · 1 = 0.

  2. 2.

    : = 0, flipped gives 1.

  3. 3.

    Different answers, so a long bar is not the same as short bars.

Common mistakes

  • Typing A'B' when you mean (AB)'. Check the "Reads as" line before submitting.

  • Reading AB as a two-letter variable. Side by side means AND.

  • Reading + as addition. It is OR.

Practice Boolean notation

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Boolean notation is taught in Boolean Algebra.