The Wayback Machine - https://web.archive.org/web/20240826095715/https://www.geeksforgeeks.org/proof-of-de-morgans-laws-in-boolean-algebra/
Open In App

Proof of De-Morgan’s Laws in Boolean Algebra

Last Updated : 29 Jul, 2024
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

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. [Tex]\overline{A \cdot B} = \overline{A} + \overline{B} [/Tex]

2. [Tex]\overline{A + B} = \overline{A} \cdot \overline{B} [/Tex]

Proof of De Morgan’s Laws

Statements:

1. (x + y)‘ = x‘.y‘

2. (x.y) = x‘ + y‘

Proof:

Here, we need to prove that the two propositions complement each other. We know that

A + A’ = 1

and

A.A‘ = 0

which are annihilation laws. Thus if we prove these conditions for the above statements of the laws then we shall prove that they are complements of each other.

For statement 1:

We need to prove that:

[Tex]LHS: (x+y)+x’.y’ =(x+y).(x+x’)+x’.y’ [/Tex]

and

[Tex]=x.x+x.y+y.x’+x’.y’=x+x.y+y.x’+x’.y’ [/Tex]

Case 1.

[Tex]=x+x.y+x’.(y+y’) [/Tex][Tex]=x+x.y+x’=x+x’+x.y [/Tex][Tex] =1+x.y=1=RHS [/Tex]

{Using distributive property}

[Tex] (x’.y’).(x+y)=0 [/Tex][Tex]LHS: (x’.y’).(x+y)=x.(x’y’)+y.(x’.y’) [/Tex][Tex]=x.0+0.x’=0=RHS [/Tex]

Hence proved.

Case 2.

[Tex]x.y+(x’+y’)=1 [/Tex][Tex]x.y.(x’+y’)=0 [/Tex][Tex]x.y+(x’+y’)=1 [/Tex]

Hence proved.

For statement 2:

We need to prove that:

[Tex] LHS: x.y+(x’+y’)=(x+x’+y’).(y+x’+y’) [/Tex]

and

[Tex]=(1+y’).(1+x’)=1=RHS [/Tex]

Case 1.

[Tex]x.y.(x’+y’)=0 [/Tex][Tex]LHS: (x.y).(x’+y’)=x.x’.y+x.y.y’ [/Tex]

{We know that A+BC=(A+B).(A+C)}

[Tex]=0=RHS [/Tex]

Hence proved.

Case 2.




Hence Proved. This proves the De-Morgan’s theorems using identities of Boolean Algebra.

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

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

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)

9).Given the Boolean expression NOT(A OR (NOT B AND C)), use De Morgan’s Laws to express this using only AND and NOT operations.

Solution :

Convert NOR gate to AND and NOT gates

Answer: A NOR B = NOT(A OR B) = (NOT A) AND (NOT B)

So, invert both inputs, then AND them.

10).Given the Boolean function F = NOT(X OR Y OR Z), express F using only AND gates and inverters (NOT gates).

Solution :

NOT(A OR (NOT B AND C))

Answer: (NOT A) AND (B OR NOT C)

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))

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.

Conclusion – Proof of De-Morgan’s Laws in Boolean Algebra

De Morgan’s Laws are fundamental principles in Boolean algebra, providing essential tools for simplifying and manipulating logical expressions. Their applications in digital circuit design, computer science, set theory, control systems, and data mining highlight their importance in various engineering and mathematical fields.

FAQs on Proof of De-Morgan’s Laws in Boolean Algebra

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.

How are De Morgan’s Laws used in digital circuit design?

They are used to simplify Boolean expressions and logic gates, optimizing circuit layouts and reducing costs.

Related Articles

De Morgan’s Law – Theorem, Proofs, Formula & Examples

Proofs for the derivatives of eˣ and ln(x) – Advanced differentiation



Similar Reads

Axioms of Boolean Algebra
In this article, we are going to discuss Axioms of Boolean Algebra; these axioms/Theorems are important as these will be used in many different topics of Digital Electronics like Sequential Circuit Designing and Combinational Circuit Designing as well. These Axioms are the building blocks of Digital Electronics. So understand these axioms carefully
4 min read
Basics of Boolean Algebra in Digital Electronics
In the time middle of the 19th century, mathematician George Boole introduced a new form of mathematical reasoning system which is widely known as Boolean Algebra. This is a special branch of mathematics in which all logic is based on only two representations True(1) and False,(0). In modern science, Boolean algebra has become a very integral part
7 min read
Properties of Boolean Algebra
The Boolean Algebra uses sets of rules for analyzing digital gates and circuits. In this article, we will be going through the Properties or Laws of the Boolean algebra. So first we will start our article by defining what are the properties of Boolean Algebra, and then we will go through what are Boolean Addition and Multiplication. Then we will go
6 min read
Absorption Law in Boolean Algebra
Boolean Algebra is a fundamental area of mathematics and computer science that deals with binary variables and logic operations. It forms the basis of the digital circuit design and is important for understanding how logical expressions are simplified and optimized. Among the various laws in the Boolean Algebra, the Absorption Law plays a significa
7 min read
Boolean Algebra
Boolean algebra is a type of algebra that is created by operating the binary system. In the year 1854, George Boole, an English mathematician, proposed this algebra. This is a variant of Aristotle's propositional logic that uses the symbols 0 and 1, or True and False. Boolean algebra is concerned with binary variables and logic operations. Boolean
14 min read
Computer Organization | Amdahl's law and its proof
It is named after computer scientist Gene Amdahl( a computer architect from IBM and Amdahl corporation) and was presented at the AFIPS Spring Joint Computer Conference in 1967. It is also known as Amdahl's argument. It is a formula that gives the theoretical speedup in latency of the execution of a task at a fixed workload that can be expected of a
6 min read
Use a proof by contradiction to show that there is no rational number r for which r<sup>3</sup> + r + 1 = 0
Number system is a way to represent numbers. In mathematics, there are different kinds of numbers present. Some of them are real numbers, Integers, whole numbers, rational and irrational numbers, even, odd, etc. Number system provides a unique representation for every number. There are also different types of number systems present in mathematics l
4 min read
James A. Garfield's Proof of the Pythagorean Theorem
Pythagorean theorem is a theorem for right-angled triangles, it is also referred to as the Pythagoras theorem. It is used to show the connection in the sides of a triangle which is a right-angled triangle. According to this theorem sum of squares of any two small sides is equal to the square of the biggest side. The small sides of a right-angled tr
5 min read
Proof: Why There Is No Rational Number Whose Square is 2?
Problem Statement : Why There Is No Rational Number Whose Square is 2. Rational Numbers: A number that can be expressed in the form of p/q, where p and q are integers and q ≠ 0, is known as a rational number. Examples are 0, 1, -1, 5/2, etc. Solution:Let's get started with the proof of the above problem statement. Proof in this article will be done
2 min read
Pythagoras Theorem | Formula, Proof and Examples
Pythagorean theorem states that in a right-angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides. The theorem can be expressed as r2 = p2 + q2, where 'r' is the hypotenuse and 'p' and 'q' are the two legs often called perpendicular and base of the triangle. Pythagoras Theorem explains the relationsh
8 min read
Basic Proportionality Theorem (BPT) Class 10 | Proof and Examples
Basic Proportionality Theorem: Thales theorem is one of the most fundamental theorems in geometry that relates the parts of the length of sides of triangles. The other name of the Thales theorem is the Basic Proportionality Theorem or BPT. BPT states that if a line is parallel to a side of a triangle that intersects the other sides into two distinc
8 min read
ASA Congruence Rule | Definition, Proof & Examples
ASA Congruence Rule: ASA stands for Angle-Side-Angle. It is one of the congruence tests used to test the congruence of two triangles. Other than ASA there are 4 more congruence rules i.e., SSS, SAS, AAS, and RHS. Condition of Congruency of Two Triangles: Two triangles are said to be congruent if two angles and the included side of one triangle are
8 min read
Extreme Value Theorem - Formula, Examples, Proof, Statement
Extreme value theorem proves the existence of the maximum and minimum value of the function if the function is continuous in the closed interval [a, b]. In this article, we will discuss the extreme value theorem in depth along with the extreme value theorem statement, extreme value theorem proof and how to use the extreme value theorem. We will als
8 min read
Quotient Rule: Formula, Proof, Definition, Examples
Quotient Rule is a method for finding the derivative of a function that is the quotient of two other functions. It is a method used for differentiating problems where one function is divided by another. We use the quotient rule when we have to find the derivative of a function of the form: f(x)/g(x). Let's learn about the Quotient Rule in Calculus,
7 min read
Why is the product of negative numbers positive: Proof with examples
The product of negative numbers are positive because multiplying a negative number by another negative number, the resultant operation is positive in nature. Algebra is the branch of mathematics dealing with arithmetic operations and their associated symbols. The symbols are termed as variables that may take different values when subjected to diffe
3 min read
Sum of Cube of N Natural Numbers: Formula, Proof and Examples
Sum of cube of n natural numbers is a mathematical pattern on which various questions were asked in competitive exam. So, the sum of cube of n natural numbers is obtained by the formula [n2(n+1)2]/4 where S is sum and n is number of natural numbers. Natural Numbers are the numbers started from 1 and it ends on infinity ∞. We have covered the Sum of
6 min read
Triangle Inequality Theorem, Proof & Applications
Triangle Inequality Theorem is the relation between the sides and angles of triangles which helps us understand the properties and solutions related to triangles. Triangles are the most fundamental geometric shape as we can't make any closed shape with two or one side. Triangles consist of three sides, three angles, and three vertices. The construc
9 min read
Non-Interactive Zero Knowledge Proof
Non-Interactive Zero Knowledge Proofs (NIZKs) have emerged as a main concept in the world of cryptography and engineering mathematics. These proofs enable one party to prove the validity of a statement to another party without revealing any additional information beyond the validity of the statement itself. Unlike traditional zero-knowledge proofs
6 min read
Euler’s Formula for Polyhedron : Proof, Examples and practice questions
Euler's formula for Polyhedron is a fundamental theorem in the field of geometry. Euler formula establishes a relationship between the number of vertices (V), edges (E), and faces (F) of a convex polyhedron. The formula is expressed as V - E + F = 2. The Euler Formula holds true for any convex polyhedron, such as a cube, tetrahedron, or any other s
10 min read
Derivative of Log x: Formula and Proof
Derivative of log x is 1/x. Log x Derivative refers to the process of finding change in log x function to the independent variable. The specific process of finding the derivative for log x functions is referred to as logarithmic differentiation. The function log x typically refers to the natural logarithm of x, which is the logarithm to the base e,
7 min read
Understanding Murphy's Law with Proof and Examples
In this article, we will discuss the overview of layman's terms and Murphy's law, and then we will mainly focus on proof and explanations and will understand Murphy's law with proofs and examples. Let's discuss it one by one. Murphy's Law is a popular adage that captures a fundamental and somewhat humorous aspect of human experience: "Anything that
7 min read
Proof: Why Probability of complement of A equals to one minus Probability of A [ P(A') = 1-P(A) ]
Probability refers to the extent of the occurrence of events. When an event occurs like throwing a ball, picking a card from the deck, etc., then there must be some probability associated with that event. Basic Terminologies: Random Event-If the repetition of an experiment occurs several times under similar conditions, if it does not produce the sa
4 min read
Basic Laws for Various Arithmetic Operations
Prerequisite - Number System A number is a way to represent arithmetic value, count or measure of a particular quantity. A number system can be considered as a mathematical notation of numbers using a set of digits or symbols. In simpler words the number system is a method of representing numbers. Every number system is identified with the help of
1 min read
Laws of Exponents for Real Numbers
Laws of Exponents are fundamental rules used in mathematics to simplify expressions involving exponents. These laws help in solving arithmetic problems efficiently by defining operations like multiplication, division, and more on exponents. In this article, we will discuss the laws of exponent for real number in detail with some solved examples. Ta
6 min read
Laws of Exponents
Laws of Exponents: Exponents are a way of representing very large or very small numbers. Exponent rules are the laws of the exponents that are used to solve various exponents' problems. The multiplication, division, and other operations on exponents can be achieved using these laws of exponents. There are different rules of exponents also called la
10 min read
Laws of Logarithms
The logarithm is the exponent or power to which a base is raised to get a particular number. For example, 'a' is the logarithm of 'm' to the base of 'x' if xm = a, then we can write it as m = logxa. Logarithms are invented to speed up the calculations and time will be reduced when we are multiplying many digits using logarithms. Now, Let's discuss
5 min read
Laws of Exponents: Exponents and Powers | Class 8 Maths
It is known that numbers can be expressed as xn where 'x' is called "Base" and 'n' is called as "Exponent". In simple words, we can say that the Significance of the exponent is that it tells the number of times we need to multiply our base. There are certain Laws of exponents which will make the calculation easier and faster. Let's see Laws along w
8 min read
Real-Life Applications of De Morgan’s First Law
De Morgan's Laws are a set of rules that are really useful in math and computer science. They help simplify complicated expressions or operations involving "AND," "OR," and "NOT." Imagine you're trying to figure out if something is true or false, and you're dealing with multiple conditions or choices. These laws give you shortcuts to make it easier
6 min read
De Morgan's Law - Theorem, Proofs, Formula & Examples
De Morgan's law is the most common law in set theory and Boolean algebra as well as set theory. In this article, we will learn about De Morgan's law, De Morgan's law in set theory, and De Morgan's law in Boolean algebra along with its proofs, truth tables, and logic gate diagrams. The article also includes the solved De Morgan's Law Example and FAQ
14 min read
Number of Boolean functions
In the below article, we are going to find the number of Boolean Functions possible from the given sets of binary number. Statement-1: Suppose two sets are set 'A' = {1, 2, 3, 4, ........, n} where each number will be either '0' or '1' and hence the total number of boolean variable possible will be [Tex]2^n[/Tex] and set 'B' = {0, 1}. Now the numbe
2 min read