In Boolean Algebra, what is the order of precedence?

2.3k Views Asked by At

In a course that teaches beginners Boolean Algebra I have been taught that the order of precedence is as follows:

Order of Precedence

  • Parentheses (Highest)
  • NOT
  • AND
  • OR

Where would NOR (!+) or XOR fall on this list?

1

There are 1 best solutions below

0
On BEST ANSWER

There is no such ordering universally defined.
However, when using

$'$ for NOT, as postfix notation, such as $A'$ for NOT $A$,
$+$ for OR, as in $A+B$ for $A$ OR $B$,
and $\cdot$ for AND, as in $A\cdot B$ (often abbreviated as $AB$) for $A$ AND $B$,

it is customary to observe the ring precedence notation, with $\cdot$ having higher precedence than $+$ (and $'$ having the highest of the three).
Of course the parentheses always have the highest precedence.

So, for example $$(A+B)' + A'B$$ would have the association given by these grouping with parentheses: $$((A+B)') + ((A') \cdot B).$$

If you use the typical lattice operations $\vee$ and $\wedge$, then only the precedence of $'$ above $\vee$ and $\wedge$ is usually observed.
Thus the same expression (here in lowercase, which I think is more customary with this notation, but not necessarily so!) is $$(a \vee b)' \vee a' \wedge b.$$ I don't recall having ever seen an expression like this in a lattice context, but it doesn't seem to be ill-formed, so if I did, I would interpret it as $$((a \vee b)' \vee a') \wedge b.$$