Introduction to Boolean Algebra

3 min read
← Back

1. Introduction

Boolean algebraBoolean algebraThe algebra of two values, with ∧, ∨ and ¬ as its operations.Read the full entry is a branch of mathematics that deals with logical operations and binary variablespropositional variableA letter such as p or A standing in for an arbitrary proposition.Read the full entry. Named after George Boole, who first developed it in the 1850s, Boolean algebra provides the mathematical foundation for digital logic design and computer science.

Unlike ordinary algebra that deals with numbers, Boolean algebra operates on logical values - typically represented as TRUE/FALSE, 1/0, or HIGH/LOW. This makes it perfectly suited for describing the behavior of digital circuits and logical systems.

2. Basic Elements

Boolean algebra is built upon fundamental elements that form the basis for all logical operations:

Boolean Values

The two possible values in Boolean algebra are TRUE and FALSE. TRUE can be represented as 1 or ⊤ (top), while FALSE can be represented as 0 or ⊥ (bottom). The symbols ⊤ and ⊥ are standard in formal logic, while 0 and 1 are common in computer science and digital circuits.

Boolean Variables

Boolean variables are symbols (typically letters like A, B, C) that can represent either TRUE or FALSE. They are the basic building blocks for Boolean expressions.

3. Boolean Operations

Boolean algebra defines several fundamental operations that can be performed on Boolean variables:

AND Operation (∧)

The AND operation returns TRUE only when both operands are TRUE. It is also known as logical multiplication.

ABA ∧ B
000
010
100
111
Try in Calculator
A ∧ B

OR Operation (∨)

The OR operation returns TRUE when at least one operand is TRUE. It is also known as logical addition.

ABA ∨ B
000
011
101
111
Try in Calculator
A ∨ B

NOT Operation (¬)

The NOT operation, also called negationnegationReverses a truth value: ¬p is true exactly when p is false.Read the full entry or complement, returns the opposite value of its operand. ¬

A¬A
01
10
Try in Calculator
¬A

4. Laws and Theorems

Boolean algebra follows specific laws and theorems that govern how logical operations behave. These laws are fundamental for simplifying and manipulating Boolean expressions:

Identity Laws

These laws show how Boolean variables behave when combined with the identity elements (0 for OR, 1 for AND):

  • A ∨ 0 = A
  • A ∧ 1 = A

Practice Boolean algebra basics →

Domination Laws

These laws show how Boolean variables behave when combined with the dominating elements (1 for OR, 0 for AND):

  • A ∨ 1 = 1
  • A ∧ 0 = 0

Idempotent Laws

These laws show that combining a variable with itself doesn't change the result:

  • A ∨ A = A
  • A ∧ A = A

Complement Laws

These laws describe the relationship between a variable and its complement:

  • A ∨ ¬A = 1
  • A ∧ ¬A = 0

Commutative Laws

These laws show that the order of operands doesn't affect the result:

  • A ∨ B = B ∨ A
  • A ∧ B = B ∧ A

Associative Laws

These laws show that the grouping of operands doesn't affect the result:

  • (A ∨ B) ∨ C = A ∨ (B ∨ C)
  • (A ∧ B) ∧ C = A ∧ (B ∧ C)

Distributive Laws

These laws show how operations can be distributed over each other:

  • A ∨ (B ∧ C) = (A ∨ B) ∧ (A ∨ C)
  • A ∧ (B ∨ C) = (A ∧ B) ∨ (A ∧ C)

De Morgan's Laws

These fundamental laws show the relationship between AND, OR, and NOT operations:

  • ¬(A ∨ B) = ¬A ∧ ¬B
  • ¬(A ∧ B) = ¬A ∨ ¬B
Try in Calculator
¬(A ∨ B)

5. Boolean Functions

A Boolean function is a mathematical function that takes one or more Boolean variables as input and produces a Boolean output. These functions can be represented using truth tablestruth tableA row for every assignment of values, with the formula's value in each.Read the full entry, Boolean expressions, or logic circuits.

Boolean functions are essential in digital system design, as they describe the behavior of logic gateslogic gateA circuit element computing one connective on its inputs.Read the full entry and complex digital circuits. They can be analyzed, simplified, and implemented using various techniques.

6. Boolean Expression Minimization

Minimization is the process of reducing Boolean expressions to their simplest form while maintaining the same logical behavior. This is crucial in digital design to reduce hardware complexity, cost, and power consumption.

Common minimization techniques include algebraic manipulation using Boolean laws, Karnaugh mapsKarnaugh mapA grid layout of a truth table that makes simplifications visible.Read the full entry (K-maps), and the Quine-McCluskey method. These methods help identify and eliminate redundant terms in Boolean expressions.

Truth Table to ExpressionConvert any truth table into a logical expression. Generate Boolean formulas in Disjunctive Normal Form (DNF) or Conjunctive Normal Form (CNF) from your custom truth table.

7. Applications

Boolean algebra has numerous practical applications across various fields:

Digital Circuits

Boolean algebra is fundamental to the design and analysis of digital circuits, including logic gates, processors, memory systems, and all digital electronic devices.

Computer Science

Programming languages use Boolean algebra for conditionalconditionalp → q, false only when p is true and q is false.Read the full entry statements, loops, and logical operations. It's also essential in algorithm design and computational logic.

Database Systems

Database query languages use Boolean operations for filtering and selecting data based on multiple conditions, making Boolean algebra essential for data retrieval.

Search Engines

Search engines use Boolean operators (AND, OR, NOT) to help users construct precise queries and retrieve relevant results from vast amounts of data.

Practice what you've read

6 exercises

Put this guide to work. These exercises use exactly what you have just read, and each one links back here so you can carry on.

  1. Difficulty: BeginnerWhat is the result of: true AND false?
  2. Difficulty: BeginnerWhat is the result of: false OR true?
  3. Difficulty: BeginnerWhat is the result of: NOT true?
  4. Difficulty: IntermediateSimplify the following Boolean expression to its simplest form: A & (A | B)…
  5. Difficulty: AdvancedSimplify the following expression using De Morgan's Law: !(A & B)
  6. Difficulty: AdvancedSimplify the following expression by applying the distributive law: A & (B | C)
Browse all exercises

Step 7 of 16Intermediate

0 of 16 guides read
All guides