---
title: "Boolean Algebra and Simplifying Logic Expressions"
description: "Writing a circuit as an algebraic expression and rearranging it with the laws of Boolean algebra, including De Morgan's, to reach a shorter expression with the same truth table. Fewer gates means less"
canonical: https://lightmysky.com/learn/computing/boolean-algebra-and-simplifying-logic-expressions-mt_9MrE1N63D5
source: https://lightmysky.com/learn/computing/boolean-algebra-and-simplifying-logic-expressions-mt_9MrE1N63D5.md
retrieved: 2026-11-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Boolean Algebra and Simplifying Logic Expressions

Writing a circuit as an algebraic expression and rearranging it with the laws of Boolean algebra, including De Morgan's, to reach a shorter expression with the same truth table. Fewer gates means less silicon and less energy, and less delay when the gate path gets shorter.

Subject: Computing · Area: Computer Systems · Ages 16 to 17
Page: https://lightmysky.com/learn/computing/boolean-algebra-and-simplifying-logic-expressions-mt_9MrE1N63D5

## Ready when they can

- Rewrite NOT over an AND using De Morgan's laws and check the result against a truth table
- Simplify an expression of three variables and count the gates saved
- Turn a written condition into an expression and then into gates

## Lesson: Shorter logic, same truth

Three operations build every logic expression. AND needs both sides true, OR needs at least one side true, and NOT flips its input. When operators mix, NOT runs first, then AND, then OR, while brackets override everything. So not A or B means (not A) or B, never not (A or B).

**Example.** De Morgan's law turns NOT over an AND into the OR of the flipped sides: not (A and B) equals (not A) or (not B). To check a rewrite, fill in a truth table for both forms across all four rows of A and B. Every row must match. If even one row differs, the rewrite is wrong.

**Example.** Simplifying swaps a long expression for a shorter one with the same truth table. When two AND terms share an input, it can come outside: (A and B) or (A and C) equals A and (B or C). Counting each two-input AND or OR as one gate, the long form uses 3 gates and the short form uses 2, so 1 gate is saved. Fewer gates means less silicon and less energy. Delay drops only when the longest path through the gates gets shorter.

A written rule becomes gates in three moves: write it as an expression, shrink it, then give each operation a gate. An alarm sounds only when the door is open and the system is armed. It stays quiet when not (open and armed), which De Morgan turns into (not open) or (not armed). Check every row of the truth table before you build.

**Recap.** NOT before AND before OR. De Morgan flips the sides and swaps the operator. Shrink, check every row, then build with fewer gates.

*Lesson text, worked examples, flashcards and practice questions with worked steps, written for this dataset.*

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [Logic Gates and Truth Tables](https://lightmysky.com/learn/computing/logic-gates-and-truth-tables-mt_o2N0-q3A4Q)

## Optional connections

- [Boolean Expressions and Comparison Operators](https://lightmysky.com/learn/computing/boolean-expressions-and-comparison-operators-mt_0aIh-DPCZ4)

## Opens up

- [Logic Circuits That Add and Remember](https://lightmysky.com/learn/computing/logic-circuits-that-add-and-remember-mt_zPgkt6zf-i)
