Boolean algebra is a branch of mathematics that establishes a system of symbols for logic functions that enable the writing of logic equations and lays out the rules governing operations on logic variables, which can have just two possible values: true (1) or false (0). Boolean algebra was introduced by George Boole who was an English mathematician from 1815-1864.

In modern Boolean algebra, we use the plus (+) symbol to mean OR, the dot (•) symbol to mean AND, and a bar above a variable to mean NOT. Note that sometimes I will use ! instead of bar to mean NOT, since it is alot easier to make that happen in HTML, and that symbol (exclamation point or bang) is widely used to mean NOT in programming languages. Boolean variables, which can only have a value of 1 or 0, are typically capital letters like A, B, C, etc.

#### Operator Precedence : NOT > AND > OR

Boolean operator precedence is NOT > AND > OR. So, the expression A + !B • C would be evaluated as follows: invert B, AND that with C, and then OR that result with A. You can add parentheses around an expression to override the default operator precedence. (e.g. (A + B) • C means do A OR B first, then AND with C.) Note that this precedence order is similar to math with real number variables where AND is like multiply, OR is like add, and NOT is like the unary sign operator (e.g. -8).

In the list of Boolean Laws below, think about the logic and the meaning of AND and OR, and I think you’ll find that most of the laws make sense and are pretty obvious.

## Laws of Boolean Algebra

Law | Description |

A + 1 = 1 | A OR 1 is 1. 1 is always TRUE, so it does not matter what you OR it with, the outcome will always be TRUE. |

A + 0 = A | A OR 0 is A. 0 is always FALSE, so it has no influence on an OR function, the outcome follows the variable A. |

A • 1 = A | A AND 1 is A. 1 is always TRUE, so it has no influence on an AND function, the outcome follows the variable A. |

A • 0 = 0 | A AND 0 is 0. 0 is always FALSE, so it does not matter what you AND it with, the outcome is always FALSE. |

A + A = A | A OR A is A. A is either 0 or 1. If A is 0, then 0 OR 0 is 0, and if 1 then 1 OR 1 is 1. |

A • A = A | A AND A is A. A is either 0 or 1. If A is 0, then 0 AND 0 is 0, and if 1 then 1 AND 1 is 1. |

NOT A = A | NOT NOT A is A. An inverse of an inverse is a…umm…verse? An inverse function negates another inverse function. |

A + A = 1 | A OR NOT A is 1. Either A is 1 or NOT A is 1, so the outcome of OR is always 1. |

A • A = 0 | A AND NOT A is 0. A and NOT A can never both be 1, so the outcome of AND is always 0. |

A + B = B + A | A OR B is the same as B OR A. The commutative property works for the OR function. |

A • B = B • A | A AND B is the same as B AND A. The commutative property works for the AND function. |

A • (B + C) = A • B + A • C | A AND the quantity B OR C is A AND B OR A AND C. This is the distributive property for OR. Note the presence and absence of parentheses and the precedence of AND over OR. |

A + (B • C) = (A + B) • (A + C) | A OR the quantity B AND C is the quantity A OR B AND the quantity A OR C. This is the distributive property for AND. Note the presence and absence of parentheses and the precedence of AND over OR. |

A + B = A • B | NOT of the result of (A OR B) is equal to NOT A AND NOT B. This is De Morgan’s Theorem. |

A • B = A + B | NOT of the result of (A AND B) is equal to NOT A OR NOT B. This is also De Morgan’s Theorem. |

The last two laws constitute De Morgan’s Theorem, which turns out to be quite useful for simplifying logic equations and circuits. Another way to think of De Morgan’s Theorem is to think of De Morgan as a verb, and to DeMorgan something is to break the bar and switch the symbol. If you have multiple bars on top of an expression, then the De Morgan operation just breaks the lowest bar and does not affect higher bars.

De Morgan’s Theorem is named after Augustus De Morgan who was a British mathematician from 1806 – 1871. Here is a picture of him doing the Napoleon.

Next: Combinatorial Logic