A practical guide to understanding Boolean expressions and digital logic
Boolean Algebra is a branch of mathematics used to represent and simplify logical operations. Unlike ordinary algebra, Boolean Algebra generally works with two values: 0 and 1.
In digital systems, these two values can represent different states such as OFF and ON, FALSE and TRUE, or LOW and HIGH. Boolean Algebra provides the rules needed to work with these values and is an important foundation for understanding digital circuits and computer logic.
Boolean Algebra was developed by George Boole in the 19th century. Today, its concepts are used in digital circuit design, computer programming, database queries and many other areas of computing.
The three fundamental Boolean operations are AND, OR and NOT. These operations are used to build more complex Boolean expressions and digital circuits.
The AND operation produces an output of 1 only when all inputs are 1. It is represented by the dot symbol (·), although the multiplication symbol is sometimes omitted when writing Boolean expressions.
Example: A · B or AB
| A | B | A · B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
The OR operation produces an output of 1 when at least one input is 1.
Example: A + B
| A | B | A + B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
The NOT operation produces the complement of its input. In other words, it changes 0 to 1 and 1 to 0.
Example: If A = 1, then A' = 0.
| A | A' |
|---|---|
| 0 | 1 |
| 1 | 0 |
Boolean laws provide a systematic way to simplify Boolean expressions. Learning these laws is useful when solving logic problems and designing simpler digital circuits.
These laws show that adding 0 or multiplying by 1 does not change the value of A.
The order of the variables can be changed without changing the result.
De Morgan's theorems are useful when simplifying expressions that contain complements of AND and OR operations.
A Boolean expression combines Boolean variables and logical operations to describe a logical condition.
For example, F = AB + A'C is a Boolean expression containing the variables A, B and C.
Boolean expressions can often be simplified using Boolean laws. A simpler expression can reduce the number of operations and may also reduce the number of logic gates required in a circuit.
In Sum of Products form, product terms are combined using the OR operation.
Example: F = AB + A'C + BC
Here, AB, A'C and BC are product terms joined using OR.
In Product of Sums form, sum terms are combined using the AND operation.
Example: F = (A + B)(A' + C)
Here, (A + B) and (A' + C) are sum terms combined using AND.
A canonical Boolean expression is written so that every term contains all the variables in the function. Canonical forms are commonly expressed using minterms or maxterms.
A minterm is a product term in which every variable appears exactly once, either in complemented or uncomplemented form.
For two variables A and B, the possible minterms are:
A maxterm is a sum term in which every variable appears exactly once, either in complemented or uncomplemented form.
For a Boolean function containing n variables, there are 2n possible minterms and 2n possible maxterms.
A Karnaugh Map (K-map) is a graphical method for simplifying Boolean expressions. It provides a convenient way to identify groups of terms that can be combined and removed from an expression.
The function has three minterms: A'B, AB' and AB. Therefore, the output is 1 for the input combinations 01, 10 and 11.
On a two-variable K-map, these 1s can be grouped into adjacent pairs. One group gives the term A and the other gives the term B.
Therefore, the simplified expression is:
F(A,B) = A + B
Logic gates are electronic circuits that perform Boolean operations. They are the basic building blocks used to construct digital circuits.
| Gate | Boolean Expression | Basic Function |
|---|---|---|
| AND | Y = A · B | Output is 1 only when all inputs are 1. |
| OR | Y = A + B | Output is 1 when at least one input is 1. |
| NOT | Y = A' | Produces the complement of the input. |
| NAND | Y = (A · B)' | Produces the complement of the AND operation. |
| NOR | Y = (A + B)' | Produces the complement of the OR operation. |
| XOR | Y = A ⊕ B | Output is 1 when the inputs are different. |
| XNOR | Y = (A ⊕ B)' | Output is 1 when the inputs are the same. |
XOR produces 1 when the two inputs are different.
| A | B | A ⊕ B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
XNOR produces 1 when the two inputs are the same.
| A | B | XNOR |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Boolean Algebra is used to design and simplify digital circuits. It is useful when working with combinational circuits, sequential circuits and arithmetic circuits such as adders.
Boolean logic is commonly used in programming when a program needs to make decisions based on conditions.
For example, programming languages commonly provide logical operations corresponding to AND, OR and NOT. The exact symbols depend on the language.
Boolean logic is also used in database queries to combine conditions. For example, an SQL query can use AND and OR to determine which records should be returned.
Example:
SELECT * FROM Students WHERE Marks > 80 AND Subject = 'Computer Science';
In this example, both conditions must be true for a record to satisfy the WHERE condition.
Simplify: F = A + AB
Using the absorption law:
A + AB = A
Therefore: F = A
Simplify: F = AB + AB'
Take A as the common term:
F = A(B + B')
Using the complement law:
B + B' = 1
Therefore: F = A · 1 = A
These points are useful when revising Boolean Algebra before an examination:
After learning the basic laws and operations, practice is the best way to become comfortable with Boolean Algebra.
Simplify: F = A'B'C + A'BC + AB'C + ABC
The four terms contain all combinations of A and B while C is present in every term. Therefore:
F = C
Boolean Algebra provides a mathematical way to represent and simplify logical operations. It is an important foundation for understanding digital logic, computer architecture and programming.
Start by learning the basic AND, OR and NOT operations and their truth tables. Once these concepts are clear, practice Boolean laws, simplification problems, logic gates and K-maps. Working through examples is usually more useful than simply memorizing the laws.