Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 3

Simplifying Logic with Boolean Algebra

Recommended resources

Hello! Welcome to the third lesson in our digital design series.

In our last session, we mastered how computers represent and calculate with signed numbers using two's complement. This was about the data. Today, we move on to the logic that processes that data.

This lesson introduces Boolean algebra, the mathematical foundation for all digital circuits. We will focus on how to apply Boolean algebra laws to simplify logical expressions. This isn't just a theoretical math exercise; in digital design, a simpler expression translates directly to a smaller, faster, and more power-efficient circuit. Mastering this is a fundamental skill for any hardware designer.

By the end of this 60-minute lesson, you will be able to:

  • Identify the fundamental laws of Boolean algebra.
  • Understand and apply De Morgan's Laws to transform expressions.
  • Use these laws to simplify a given Boolean expression to a more efficient form.

1. Why We Need to Simplify

Before diving into the laws themselves, it's essential to understand the motivation. A single logical function can be represented by many different Boolean expressions, which in turn correspond to many different circuit implementations. Our goal is always to find the simplest one.

To see a concrete example of this, let's watch a short video that illustrates how a complex arrangement of logic gates can be drastically simplified.

Boolean Algebra 1 – The Laws of Boolean Algebra

The video 'Boolean Algebra 1 – The Laws of Boolean Algebra' from Computer Science Lessons starts with a great visual that shows a complex circuit and its simplified equivalent, both of which perform the exact same function.

Watch from 0:26 to 2:19. Notice the benefits mentioned for the simpler circuit: fewer components, more reliable, faster, less heat, and cheaper to make. These are the primary goals of logic simplification.


2. The Fundamental Laws of Boolean Algebra

Boolean algebra is a system of logic built around three basic operations you've likely heard of: AND, OR, and NOT.

  • AND is represented by a dot () or no symbol (e.g., or ). The output is 1 only if all inputs are 1.
  • OR is represented by a plus sign () (e.g., ). The output is 1 if any input is 1.
  • NOT is represented by an overbar or a prime (e.g., or ). It inverts the input.

Just like in regular algebra, Boolean algebra has a set of laws or identities that we can use to manipulate expressions. Let's explore them.

Boolean Algebra 1 – The Laws of Boolean Algebra

We'll continue with the same video, which provides an excellent overview of the key laws. It visualizes each law with a corresponding logic gate diagram, making the concepts very clear.

Watch the following segments, which group related laws together: Fundamental Rules (2:19 - 5:54): This covers the Annulment, Identity, Idempotent, Complement, and Double Negation laws. These are the basic building blocks. Algebraic Properties (8:01 - 12:34): This section covers the Associative, Commutative, and Distributive laws. Notice how these relate to properties you already know from standard algebra. Absorption Law (12:34 - 13:12): This is a powerful and unique simplification law to watch for. \nPay attention to the logic gate diagrams, which prove that both sides of the equation for each law are equivalent.

For your reference, here is a complete table of the fundamental Boolean identities from a university logic design course. It's a great resource to have handy.

[PDF] Boolean Algebra and Digital Logic - McMaster University

This table from the textbook 'Boolean Algebra and Digital Logic' by McMaster University summarizes all the laws we've just seen, including their dual forms (AND vs. OR).

Review the table titled 'Basic Identities of Boolean Algebra' (Table 3.5). You don't need to memorize it right now, but get familiar with its structure. Notice the 'duality principle' in action: each law has an AND form and an OR form.


3. A Closer Look at De Morgan's Law

Among all the laws, De Morgan's Law is especially powerful and deserves special attention. It provides a method for complementing a complex expression and is key to converting between different types of logic gates (for instance, implementing an OR function using only NAND gates).

De Morgan's two laws are:

A simple way to remember this is the phrase: "Break the bar, change the sign." You break the long overbar into smaller ones over each variable and change the operator from OR to AND, or vice-versa.

Let's see this visualized.

De Morgan's Law with Logic Gates
This image illustrates De Morgan's Law by showing logic gate equivalences. A NOR gate is equivalent to an AND gate with inverted inputs ("bubbled AND"). A NAND gate is equivalent to an OR gate with inverted inputs ("bubbled OR").

The following video provides a focused explanation of De Morgan's law, proving it with truth tables and showing how to apply it to more complex expressions.

De Morgan's Law in Boolean Algebra Explained (with Solved Examples)

The video 'De Morgan's Law in Boolean Algebra Explained' by ALL ABOUT ELECTRONICS will solidify your understanding of this crucial theorem.

Watch from the beginning to 9:08. Focus on: The gate equivalences and truth table proofs for both laws (0:32 - 6:49). The general rule of 'breaking the bar and changing the sign' (6:49 - 7:35). The step-by-step example of applying the law to simplify an expression (7:35 - 9:08).


4. Putting It All Together: Simplification in Action

Now, let's apply these laws to simplify a Boolean expression derived from a logic circuit.

Boolean Algebra Circuit Example and Simplification
This image shows a complete example. It starts with a logic circuit, derives the initial Boolean expression, simplifies it step-by-step using Boolean laws, and finally shows the much simpler equivalent circuit.

Let's walk through the simplification shown in the image:
The initial expression derived from the circuit is .

    • Idempotent Law: .
    • Distributive Law: . Here, , , and .
    • Inverse Law: .
    • Identity Law: .

The final circuit, which requires only one NOT gate and one OR gate, is significantly simpler than the original, yet functionally identical.

Practice Exercise

Now it's your turn. Use the Boolean laws to simplify the following expression. List the law you use for each step.

Simplify:

Click for solution
    • Distributive Law: Factoring out .
    • Inverse Law: .
    • Identity Law: .
    • Distributive Law: Factoring out .
    • Inverse Law: .
    • Identity Law: .

The entire complex expression simplifies down to just ! This is a dramatic demonstration of the power of Boolean simplification.


Conclusion

In this lesson, we transitioned from representing numbers to manipulating the logic that operates on them. You've learned the fundamental rules that govern digital circuits and how to apply them to make those circuits more efficient.

Here are the key takeaways:

  • Boolean algebra is the mathematics used to analyze and simplify digital logic circuits.
  • Simplifying Boolean expressions is critical for creating hardware that is smaller, faster, and consumes less power.
  • The basic laws (Identity, Idempotent, Distributive, etc.) are your tools for manipulation.
  • De Morgan's Law is a particularly powerful tool for complementing expressions and transforming logic, remembered by the rule "break the bar, change the sign."

So far, we've taken an existing expression and simplified it. But where do these expressions come from in the first place? In our next lesson, we will learn how to derive a Boolean expression from a truth table using the sum-of-products form, allowing us to translate a desired behavior directly into the language of logic.