# De-Morgan's Theorem

A famous mathematician DeMorgan invented the two most important theorems of boolean algebra. The DeMorgan's theorems are used for mathematical verification of the equivalency of the NOR and negative-AND gates and the negative-OR and NAND gates. These theorems play an important role in solving various boolean algebra expressions. In the below table, the logical operation for each combination of the input variable is defined.

Input variablesOutput Condition
ABANDNANDORNOR
000101
010110
100110
111010

The rules of De-Morgan's theorem are produced from the Boolean expressions for OR, AND, and NOT using two input variables x and y. The first theorem of Demorgan's says that if we perform the AND operation of two input variables and then perform the NOT operation of the result, the result will be the same as the OR operation of the complement of that variable. The second theorem of DeMorgan says that if we perform the OR operation of two input variables and then perform the NOT operation of the result, the result will be the same as the AND operation of the complement of that variable.

## De-Morgan's First Theorem

According to the first theorem, the complement result of the AND operation is equal to the OR operation of the complement of that variable. Thus, it is equivalent to the NAND function and is a negative-OR function proving that (A.B)' = A'+B' and we can show this using the following table.

InputsOutput For Each Term
ABA.B(A.B)'A'B'A'A+B'
0001111
0101101
1001011
1110000

## De-Morgan's Second Theorem

According to the second theorem, the complement result of the OR operation is equal to the AND operation of the complement of that variable. Thus, it is the equivalent of the NOR function and is a negative-AND function proving that (A+B)' = A'.B' and we can show this using the following truth table.

InputsOutput For Each Term
ABA+B(A+B)'A'B'A'.B'
0001111
0110100
1010010
1110000

Let's take some examples in which we take some expressions and apply DeMorgan's theorems.

Example 1: (A.B.C)'

(A.B.C)'=A'+B'+C'

Example 2: (A+B+C)'

(A+B+C)'=A'.B'.C

Example 3: ((A+BC')'+D(E+F')')'

For applying the DeMorgan's theorem on this expression, we have to follow the following expressions:

1) In complete expression, first, we find those terms on which we can apply the DeMorgan's theorem and treat each term as a single variable.

So,

2) Next, we apply DeMorgan's first theorem. So,

3) Next, we use rule number 9, i.e., (A=(A')') for canceling the double bars.

4) Next, we apply DeMorgan's second theorem. So,

5) Again apply rule number 9 to cancel the double bar

Now, this expression has no term in which we can apply any rule or theorem. So, this is the final expression.

Example 3: (AB'.(A + C))'+ A'B.(A + B + C')'