Skip to main content

Section 7.2 Boolean algebra

The analysis of digital circuits and their behaviors can be conducted in two ways: 1) the method of exhaustion, and 2) Boolean algebra. The method of exhaustion is a brute-force method in which each gate in a circuit is evaluated in turn based on the inputs values it receives. We used this method in the previous section as we were evaluating circuits constructed solely with NAND gates. Boolean algebra is a mathematical formalism used for two-state variables and the operations that act on these variables. This formalism allows us to analyze circuits containing multiple gates through equation manipulation.
Boolean algebra, like standard algebra, is governed by rules that determine how mathematical operations interact. The following Boolean identities provide these rules by which we must adhere.
List 7.2.1. Boolean identities
  1. \(\displaystyle A+B = B+A\)
  2. \(\displaystyle A \cdot B = B \cdot A\)
  3. \(\displaystyle A+(B+C) = (A+B) + C\)
  4. \(\displaystyle A\cdot(B\cdot C) = (A\cdot B)\cdot C \)
  5. \(\displaystyle A\cdot(B+C) = A\cdot B + A\cdot C \)
  6. \(\displaystyle (A+B)\cdot(C+D) = A\cdot C + A\cdot D + B\cdot C + B\cdot D \)
  7. \(\displaystyle \overline{1}=0 \)
  8. \(\displaystyle \overline{0}=1 \)
  9. \(\displaystyle A\cdot 0 = 0 \)
  10. \(\displaystyle A\cdot 1 = A \)
  11. \(\displaystyle A + 0 = A \)
  12. \(\displaystyle A + 1 = 1 \)
  13. \(\displaystyle A + A = A \)
  14. \(\displaystyle A \cdot A = A \)
  15. \(\displaystyle \overline{\overline{A}} = A \)
  16. \(\displaystyle A + \overline{A} = 1 \)
  17. \(\displaystyle A \cdot \overline{A} = 0 \)
  18. \(\displaystyle \overline{A + B} = \overline{A} \cdot \overline{B} \)
  19. \(\displaystyle \overline{A\cdot B} = \overline{A} + \overline{B} \)
  20. \(\displaystyle A + \overline{A}\cdot B = A+B \)
  21. \(\displaystyle \overline{A}+A\cdot B = \overline{A} + B \)
  22. \(\displaystyle A \oplus B = \overline{A}\cdot B + A\cdot\overline{B} = (A+B)\cdot(\overline{A\cdot B}) \)
  23. \(\displaystyle \overline{A\oplus B} = A\cdot B + \overline{A}\cdot\overline{B} \)
Let’s look at a few examples demonstrating the use of Boolean algebra.

Example 7.2.2. Boolean algebra: NOT gate from NAND gates.

Use Boolean algebra to build a NOT gate from one NAND gate.
Answer.
We want the result \(\overline{A}\) for input \(A\) using only NAND gates. Starting with our desired result, we find that
\begin{equation*} \overline{A} = \overline{A\cdot A}\qquad \text{(Identity 14)}\text{.} \end{equation*}
So, NOT-gate functionality can be produced using the circuit in Figure 7.1.4.

Example 7.2.3. Boolean algebra: AND gate from NAND gates.

Use Boolean algebra to make an AND gate from two NAND gates.
Answer.
We want the result \(A\cdot B\text{.}\) Starting with our desired result, we find that
\begin{align*} A\cdot B \amp = \overline{\overline{A\cdot B}} \amp \text{(identity 15)\ } \\ \amp = \overline{\left(\overline{A\cdot B}\right)\cdot \left(\overline{A\cdot B}\right)} \amp \text{(identity 14)} \text{.} \end{align*}
So, AND-gate functionality can be produced using the circuit in Figure 7.1.6.

Example 7.2.4. Boolean algebra: OR gate from NAND gates.

Use Boolean algebra to make an OR gate from three NAND gates.
Answer.
We want the result \(A+B\) and want expressions containing AND-like functions instead of OR-like functions. DeMorgan’s theorems (identities 18 and 19) are thus going to be instrumental to our effort. Starting with our desired result, we find that
\begin{align*} A+B \amp = \overline{\overline{A+B}} \amp \text{(identity 15)} \\ \amp = \overline{\overline{A}\cdot\overline{B}} \amp \text{(identity 18)} \\ \amp = \overline{\left(\overline{A\cdot A}\right)\cdot \left(\overline{B\cdot B}\right)} \amp \text{(identity 14)} \end{align*}
which describes the circuit in Figure 7.2.5.
Figure 7.2.5. NAND circuit providing AND functionality.

Example 7.2.6. Boolean algebra: Circuit simplification.