Proof of DeMorgan's Laws in Boolean Algebra (original) (raw)
Last Updated : 12 Jul, 2025
**De Morgan's Laws are fundamental principles in Boolean algebra and set theory, providing rules for transforming logical expressions. These laws are essential for simplifying and manipulating Boolean expressions, which have significant applications in digital circuit design, computer science, and engineering. This article provides a detailed proof of De Morgan's Laws in Boolean algebra.
De-Morgan's Laws
De Morgan's Laws state that the complement of the conjunction (AND) of two variables is equal to the disjunction (OR) of their complements, and the complement of the disjunction (OR) of two variables is equal to the conjunction (AND) of their complements. Mathematically, the laws are expressed as:
1. \overline{A \cdot B} = \overline{A} + \overline{B}
2. \overline{A + B} = \overline{A} \cdot \overline{B}
Proof of De Morgan's Laws
**Statements:
**1. (x + y) ' = x ' .y '
**2. (x.y) = x ' + y '
**Proof:
**First Statement: \overline{x + y} = x' \cdot y'
To prove:
(x + y)′=x′⋅ y'
We use the fundamental Boolean identities:
- **Complement Rule: A + A′= 1 and A⋅ A′=0.
- **Distributive Property: A + B.C = (A+B) ⋅(A+C).
Step-by-step proof:
- Consider the expression: (x+y)'+x'⋅y.
- Expanding using Boolean identities: (x+y)'=(x+y)⋅(x'+y')
- Applying De Morgan’s transformation: (x+y)⋅(x'+y')=x.x'+x.y'+y.x'+y⋅y'
- Using x⋅x'=0 and y⋅y'=0, we simplify: 0+x⋅y' +y⋅x ′ +0=x' ⋅y'
- Since x' \cdot y' = \overline{x + y}, we conclude: \overline{x + y} = x' \cdot y'
**Second statement : \overline{x \cdot y} = x' + y'
To prove: (x⋅y)′=x′+y′
Using Boolean properties:
- **Complement Rule: A + A′=1 and A⋅ A′=0.
- **Distributive Property: A (B + C)= AB + AC.
**Step-by-step proof:
- Consider the expression: (x. y)'+ (x'+ y).
- Expanding using Boolean identities: (x.y)'= (x.y) + (x'+y')
- Applying De Morgan’s transformation: (x.y) + (x'+y')= x.x'+ x.y' + y.x' + y⋅y'
- Using x⋅x'=0 and y⋅y'=0,, we simplify: 0+x+y' +0=x' ⋅y'
- Since x' + y' = \overline{x . y}, we conclude: \overline{x + y} = x' + y'
**Proof of De-Morgan's law of boolean algebra using Truth Table:
**1) (x+y)’= x’. y’
| x | y | x+y | (x+y)’ | x’ | y’ | x’. y’ |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 | 0 | 0 |
Here \overline{x} + \overline{y}
- Column x+y: The OR operation means at least one input must be 1 to get 1.
- Column \overline{x + y}: This is the complement (NOT operation), meaning it flips the values of x+y.
- Column \overline{x} and \overline{y}: These represent the individual complements of x and y.
- Column \overline {x}.\overline{y}: The AND operation is applied to the complements.
Hence the first De-morgan law of boolean algebra is proved (x +y)’= x’. y’
**2) (x.y)’=x’+y’
| x | y | x.y | (x.y)’ | x’ | y’ | x’ + y’ |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 0 | 0 | 0 |
Here
- Column x⋅y: The AND operation means both inputs must be 1 to get 1.
- Column \overline{x \cdot y}: This is the complement, meaning it flips the values of x⋅y.
- Column \overline{x} and \overline{y}: These represent the individual complements of x and y.
- Column : The OR operation is applied to the complements.
Hence the second De-morgan law of boolean algebra is proved (x.y)’=x’+y’
Solved Examples
**1) Using De Morgan's Laws, simplify the following expression:
**NOT(A OR (B AND C))
**Solution :
NOT(A OR (B AND C))
Answer: (NOT A) AND (NOT B OR NOT C)
**2).Prove that the following expressions are equivalent using De Morgan's Laws:
****(NOT A AND NOT B) OR (NOT A AND C) = NOT A AND (NOT B OR C)**
**Solution :
(NOT A AND NOT B) OR (NOT A AND C) = NOT A AND (NOT B OR C)
Answer: This is correct.
Proof: NOT A AND (NOT B OR C)
= (NOT A AND NOT B) OR (NOT A AND C) [Using distributive law]
**3).In a digital circuit, you have an AND gate followed by a NOT gate. Using De Morgan's Laws, how can you represent this using only OR and NOT gates?
**Solution :
AND gate followed by NOT gate using only OR and NOT gates
Answer: Use NOT gates on each input, then feed these into an OR gate.
NOT(A AND B) = (NOT A) OR (NOT B)
**4).Simplify the following Boolean expression using De Morgan's Laws:
**NOT(A AND B AND C)
**Solution :
NOT(A AND B AND C)
Answer: (NOT A) OR (NOT B) OR (NOT C)
**5).In computer networking, a firewall rule allows traffic that is "not from subnet A and not destined for port 80". Express this rule in terms of positive conditions using De Morgan's Laws.
**Solution :
F = NOT(X OR Y OR Z)
Answer: F = (NOT X) AND (NOT Y) AND (NOT Z)
**6).Prove or disprove: NOT(A XOR B) = (NOT A) XOR (NOT B)
**Solution :
"Not from subnet A and not destined for port 80"
Answer: From any subnet except A AND destined for any port except 80
**7).Simplify the following expression using De Morgan's Laws:
**NOT(A OR NOT(B AND C))
**Solution :
NOT(A XOR B) = (NOT A) XOR (NOT B)
Answer: This is false.
NOT(A XOR B) = (A AND B) OR (NOT A AND NOT B)
But (NOT A) XOR (NOT B) = (NOT A AND B) OR (A AND NOT B)
**8).In digital logic, how would you use De Morgan's Laws to convert a NOR gate into an equivalent combination of AND and NOT gates?
**Solution :
NOT(A OR NOT(B AND C))
Answer: (NOT A) AND (B AND C)
Applications in Engineering
1. Digital Circuit Design
De Morgan's Laws are used extensively in digital circuit design to simplify Boolean expressions and logic gates, optimizing circuit layouts and reducing costs.
2. Computer Science
In computer science, De Morgan's Laws are used in algorithms and programming to simplify logical expressions, making code more efficient and readable.
3. Set Theory
In set theory, De Morgan's Laws describe the relationships between union, intersection, and complement of sets, providing a foundation for various mathematical operations.
4. Control Systems
In control systems, De Morgan's Laws help in designing and analyzing logic controllers, ensuring correct and efficient system behavior.
5. Data Mining
In data mining, De Morgan's Laws are applied to simplify queries and logical conditions, improving the performance of data retrieval and analysis processes.
Practice Problems
1. Simplify: NOT(A AND (B OR C))
2. Prove that NOT(A OR B OR C) = (NOT A) AND (NOT B) AND (NOT C)
3. Convert the expression (A NAND B) to use only OR and NOT gates.
4. Simplify: NOT(NOT A OR (B AND NOT C))
5. In a computer program, you need to check if a number is not between 1 and 10 inclusive. Express this condition using De Morgan's Laws.
6. Prove or disprove: NOT(A AND B) XOR C = (NOT A OR NOT B) XOR C
7. Simplify the Boolean expression: NOT((A AND B) OR (NOT A AND C))
8. Given F = NOT(X AND Y AND Z), express F using only OR gates and inverters.
9. In a digital circuit, you have a NOR gate followed by a NOT gate. Simplify this using De Morgan's Laws.
10. Express the following using only AND and NOT operations: NOT(A OR (B AND NOT C) OR (NOT A AND D))
Are De Morgan’s Laws used in Set Theory?
Yes! De Morgan’s Laws also apply to sets and Venn diagrams:
- (A∪B)′= A′∩B′ (Complement of union is the intersection of complements).
- (A∩B)′= A′∪B′ (Complement of intersection is the union of complements).
**Are De Morgan’s Laws used in Set Theory?
Yes, but set operations differ from Boolean algebraic proofs.
**What are De Morgan's Laws?
De Morgan's Laws state that the complement of the conjunction (AND) of two variables is equal to the disjunction (OR) of their complements, and vice versa.