All labs › Learn › Digital Logic Design
All articlesAll labs

Boolean Algebra and De Morgan's Laws

Learn the Boolean identities, absorption and consensus, and De Morgan's laws, with worked simplification examples and truth table proofs you can check.

Updated 28 November 2026 · 4 min read · Designed by Fasih Ullah Saleem

01Algebra for two valued variables02The basic identities03Absorption and consensus04De Morgan's laws05Gate form of De Morgan's laws06A worked simplification07Simplifying with De Morgan08Try it in the virtual lab09Questions and answers10Related topics
01

Algebra for two valued variables

Boolean algebra is the algebra of variables that can be only 0 or 1. It has three basic operations: AND, written as a dot or as two letters side by side, OR, written with a plus sign, and NOT, written with an apostrophe or a bar. Every circuit of gates can be written as a Boolean expression, and every expression can be built as a circuit.

The reason to learn the rules is economy. A simpler expression needs fewer gates, fewer chips and fewer wires. It also has fewer places to go wrong.

02

The basic identities

RuleAND formOR form
IdentityA · 1 = AA + 0 = A
NullA · 0 = 0A + 1 = 1
IdempotentA · A = AA + A = A
ComplementA · A' = 0A + A' = 1
Double negation(A')' = A(A')' = A
CommutativeA · B = B · AA + B = B + A
DistributiveA (B + C) = AB + ACA + BC = (A + B)(A + C)

Every row has two forms. If you swap AND and OR and swap 0 and 1 in a true statement, the result is also true. This is called duality.

03

Absorption and consensus

Three rules remove terms from an expression, and they are used constantly.

A + AB = A
A + A'B = A + B
AB + A'C + BC = AB + A'C

The first rule says that when A is 1, the term AB adds nothing, and when A is 0 the term AB is 0. The second removes a variable. The third is the consensus theorem: the term BC is redundant, because whenever it would matter, one of the other two terms is already 1.

04

De Morgan's laws

De Morgan's laws tell you how a NOT sign passes through an AND or an OR.

(A · B)' = A' + B'
(A + B)' = A' · B'

In words: the opposite of an AND is the OR of the opposites, and the opposite of an OR is the AND of the opposites. They work for any number of variables. Prove the first one with a truth table. For A = 1 and B = 1, the left side is (1)' = 0 and the right side is 0 + 0 = 0. For A = 1 and B = 0, the left side is 0' = 1 and the right side is 0 + 1 = 1. The other two rows agree as well.

05

Gate form of De Morgan's laws

The laws also have a drawing form. A NAND gate is the same as an OR gate with a bubble on each input. A NOR gate is the same as an AND gate with a bubble on each input. Circuit designers use the form that makes the signal polarity clear. An active low enable is often drawn as an OR gate with bubbled inputs, even though the chip is a NAND.

06

A worked simplification

Simplify F = AB + AB' + A'B step by step.

F = AB + AB' + A'B
  = A (B + B') + A'B        take A out of the first two terms
  = A · 1 + A'B             complement rule
  = A + A'B                 identity rule
  = A + B                   absorption

The original expression needs three AND gates and one OR gate. The result is one OR gate. You can check it by a truth table: F is 0 only for A = 0 and B = 0, exactly as A + B is.

07

Simplifying with De Morgan

Take Y = ((A + B) · C)'. Apply De Morgan to the outer bar: Y = (A + B)' + C'. Apply it again to the first term: Y = A'B' + C'. The expression now has no long bars, and can be built with two inverters, one AND and one OR.

When a result is long, try the truth table and a Karnaugh map as a check, since algebra can hide a better answer.

08

Try it in the virtual lab

SinBench has free 3D benches and interactive demos for this topic. Open one to try the ideas above with real instruments, no sign up needed.

Lab 1

Logic Gates and Boolean Theorems

Open the lab →Concepts and demos
Lab 2

NAND and NOR as Universal Gates

Open the lab →Concepts and demos
09

Questions and answers

What are De Morgan's laws?

The complement of an AND is the OR of the complements: (AB)' = A' + B'. The complement of an OR is the AND of the complements: (A + B)' = A'B'.

What is the absorption law?

A + AB = A. The term AB is absorbed, because it can be 1 only when A is already 1.

Why simplify a Boolean expression?

A simpler expression needs fewer gates and chips, costs less, uses less power and has fewer wires that can be wrong.

What is the consensus theorem?

It says AB + A'C + BC = AB + A'C. The third term is redundant and can be removed.

10

Related topics

Digital Logic Design

Logic Gates and Truth Tables: AND, OR, NOT, NAND, NOR, XOR

Learn the seven basic logic gates with truth tables, symbols and expressions, the common TTL chips that hold them and how to read a gate level circuit.

Digital Logic Design

NAND and NOR as Universal Gates

See why NAND and NOR are universal gates. Build NOT, AND, OR and XOR from NAND only and from NOR only, count the gates and use two level NAND logic.

Digital Logic Design

Karnaugh Maps: Simplify Boolean Functions Step by Step

A step by step guide to Karnaugh maps: how to fill a 4 variable map, group cells, use don't cares and write the simplest sum of products, with a worked example.

SinBench SinBench · Free virtual labsDesigned by Fasih Ullah Saleem
© 2026 Fasih Ullah Saleem. All rights reserved. fasihullahsaleem.com · About · Terms of Use · Privacy