Boolean Algebra
Learning Outcomes
- Identify the AND, OR, and NOT operations in Boolean Algebra.
- Simplify Boolean Algebra expressions using laws of Boolean Algebra.
🎥 Lecture Video
🎥 Lecture Video
In the previous section we explained how to generate a truth-table from a given circuit (we simply need to evaluate it for input combinations). The big question is: How do we go the other way? How do we derive a circuit of logic gates from a truth-table?
History: George Boole and Claude Shannon
In the 19th Century, the mathematician George Boole (1815-1864), developed a mathematical system (algebra) involving logic, later becoming known as Boolean algebra. His variables took on the values of TRUE and FALSE. Later, Claude Shannon (the father of information theory, 1916–2001) wrote his Master’s thesis on how to map Boolean algebra to digital circuits.
Boolean Algebra Operations
We can also define operations for NAND, NOR, and XOR (though these are not considered basic operations).
Why use Boolean Algebra
The value of Boolean algebra for circuit design comes from the fact that Boolean expressions can be manipulated mathematically. In general, it is much easier to manipulate equations than it is to directly manipulate circuits.
-
Simplify Circuits. A Boolean algebra expression can be simplified. This simplification will lead directly to a circuit simplification. Using fewer gates means using fewer transistors—cheaper and more energy-efficient!
-
Verify circuits. Another use for Boolean algebra is in circuit verification. Given a circuit and a Boolean equation, we can ask the question, “Do the two different representations represent the same function?” The first step would be to derive a new Boolean expression based on the circuit. Then through algebraic manipulation we could manipulate the expressions until they match, thereby “proving” the eqivalence of the two.
Example
We can use Boolean algebra to verify the below simplification. The first circuit (), which uses three gates, is equivalent to the second circuit (), which uses just one OR gate. We describe this approach at the end of this section.
We will revisit this example.
Laws of Boolean Algebra
Along with Boolean algebra comes a collection of laws that apply to Boolean expressions. These are simple algebraic equalities that are known to be true. We can manipulate other Boolean expressions through successive application of these laws.
#tab-boolean-laws lists the most important of the common Boolean laws.
Some laws are similar to ordinary (non-Boolean) algebra, but many are specific to Boolean algebra and rely on variables taking on precisely two truth values: 1 (true) and 0(false).
Because of the symmetry of Boolean algebra all these laws come in two versions (the two columns above), one being called the dual version of the other. Practically speaking, this means you only need to remember one version of the law, and the other one can be naturally derived.
Proofs
Analyze the proofs below, which fall into two categories:
- Exhaustive proof, i.e., making truth tables (where again, truth tables enumerate the input/output relationship for all possible input values) then identifying the columns that represent the left-hand and/or right-hand sides of the equation.
- Algebraic manipulation by using other laws.
::::::{note} Law of 0’s, Law of 1’s :class: dropdown
| 0 | 0 |
| 1 | 0 |
| 0 | 1 |
| 1 | 1 |
Distributivity
Coming soon…
::::::{note} Idempotence :class: dropdown
| 0 | 0 |
| 1 | 1 |
| 0 | 0 |
| 1 | 1 |
::::::{note} DeMorgan’s Laws :class: dropdown
At a high-level: “distribute” the inversion (e.g., dual) over x, y and operator.
| 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 0 | 0 | 0 |
| 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 | 0 | 0 |
Example, revisited
Let us return to the example described above and prove that the first circuit is equivalent to the second circuit.