Boolean Algebra: Concepts, Laws, Logic Gates and K-Maps
Learn how Boolean expressions work, how to simplify them, and how they are used in digital circuits, programming, and database queries.
Learn how Boolean expressions work, how to simplify them, and how they are used in digital circuits, programming, and database queries.
Boolean Algebra is a branch of mathematics used to represent and simplify logical operations. Unlike ordinary algebra, Boolean variables normally have only two possible values: 0 and 1.
In digital systems, these values can represent OFF and ON, FALSE and TRUE, or LOW and HIGH. Boolean Algebra provides the rules used to analyse digital logic and design electronic circuits.
Boolean Algebra was developed by George Boole in the nineteenth century. Today, it is used in digital circuit design, programming, search conditions, database queries, and computer architecture.
The AND operation produces an output of 1 only when all inputs are 1. It is represented by a dot (·), or the dot may be omitted.
Example: A · B, or simply 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. 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 method for simplifying expressions. A simpler expression can reduce the number of gates required in a digital circuit.
| Law | Boolean Expressions |
|---|---|
| Identity law | A + 0 = A; A · 1 = A |
| Domination law | A + 1 = 1; A · 0 = 0 |
| Idempotent law | A + A = A; A · A = A |
| Complement law | A + A' = 1; A · A' = 0 |
| Commutative law | A + B = B + A; A · B = B · A |
| Associative law | A + (B + C) = (A + B) + C; A · (B · C) = (A · B) · C |
| Distributive law | A(B + C) = AB + AC; A + BC = (A + B)(A + C) |
| Absorption law | A + AB = A; A(A + B) = A |
De Morgan's theorems are useful when simplifying complemented expressions.
A Boolean expression combines variables and Boolean operations to describe a logical condition. For example, F = AB + A'C contains the variables A, B, and C.
In SOP form, product terms are combined using OR operations. For example, F = AB + A'C + BC.
In POS form, sum terms are combined using AND operations. For example, F = (A + B)(A' + C).
A minterm is a product term in which every variable appears exactly once. A maxterm is a sum term in which every variable appears exactly once.
For two variables A and B, the minterms are A'B', A'B, AB', and AB. For a function containing n variables, there are 2n possible minterms and 2n possible maxterms.
A Karnaugh Map, or K-map, is a graphical method used to simplify Boolean expressions. It helps identify terms that can be grouped and reduced.
Simplify: F(A, B) = A'B + AB' + AB
The expression is 1 for 01, 10, and 11. Grouping the adjacent cells on a two-variable K-map gives the terms A and B.
Therefore, F(A, B) = A + B.
Logic gates are electronic circuits that perform Boolean operations. They are the building blocks of digital systems.
| Gate | Boolean Expression | Function |
|---|---|---|
| AND | Y = AB | 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 = (AB)' | Produces the complement of AND. |
| NOR | Y = (A + B)' | Produces the complement of OR. |
| 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. |
Boolean Algebra is used to design and simplify combinational circuits, sequential circuits, adders, multiplexers, and many other digital systems.
Programs use Boolean logic to make decisions based on conditions. In many programming
languages, && represents AND, || represents OR,
and ! represents NOT.
SQL uses Boolean operators to filter records. For example:
SELECT * FROM Students
WHERE Marks> 80 AND Subject = 'Computer Science';
A record is returned only when both conditions are true.
Simplify: F = A + AB
Using the absorption law, A + AB = A.
Therefore, F = A.
Simplify: F = AB + AB'
Take A as the common factor: F = A(B + B').
Since B + B' = 1, F = A · 1 = A.
Therefore, F = A.
Simplify: F = A'B'C + A'BC + AB'C + ABC
All four combinations of A and B are present, while C appears in every term. Therefore, F = C.
Correct Answer: B) NAND and NOR
Explanation: NAND and NOR gates are called universal gates because any Boolean function or digital logic circuit can be implemented using exclusively NAND gates or exclusively NOR gates.
Correct Answer: C) A
Explanation: By the Absorption Law, A + AB = A(1 + B) = A · 1 = A. The redundant term AB is absorbed by A.
Correct Answer: B) A' + B'
Explanation: De Morgan's Theorem states that the complement of a product is equal to the sum of the individual complements: (AB)' = A' + B'.
Correct Answer: C) When the inputs are different
Explanation: An Exclusive-OR (XOR) gate gives an output of 1 only when the inputs are complementary/different (e.g., A=0, B=1 or A=1, B=0).
Correct Answer: D) 8
Explanation: K-map grouping rules dictate that every group of adjacent 1s must contain a power-of-two number of cells (1, 2, 4, 8, 16, etc.). Thus, 8 is the only valid group size among the choices.
Correct Answer: B) NAND and NOR
Explanation: NAND and NOR gates are called universal gates because any Boolean function or digital logic circuit can be implemented using exclusively NAND gates or exclusively NOR gates.
Correct Answer: C) A
Explanation: By the Absorption Law, A + AB = A(1 + B) = A · 1 = A. The redundant term AB is absorbed by A.
Correct Answer: B) A' + B'
Explanation: De Morgan's Theorem states that the complement of a product is equal to the sum of the individual complements: (AB)' = A' + B'.
Correct Answer: C) When the inputs are different
Explanation: An Exclusive-OR (XOR) gate gives an output of 1 only when the inputs are complementary/different (e.g., A=0, B=1 or A=1, B=0).
Correct Answer: D) 8
Explanation: K-map grouping rules dictate that every group of adjacent 1s must contain a power-of-two number of cells (1, 2, 4, 8, 16, etc.). Thus, 8 is the only valid group size among the choices.
These primary standards, official documentation, and established textbooks are useful for checking terminology and studying beyond this revision guide.