To understand the conversion we have to first understand the working of individual gates-
1.NOT Gate- This is the simplest form of a digital logic circuit . It is also called as inverter. It consists of only one input and one output. Input can only be binary number it may be one or zero. NOT gate is a logic element whose output stage is always the complement of the input stage means when you supply logic 1 we will logic 0 and vice versa. Now how many stage are possible is calculated by 2^{n} (where n is the number of input) means hear we have input equal to 1 so number of stage possible is 0 and 1 (2^{1}). Truth table of NOT gate is as follows-
Input(2^{1}) | Output |
A | Y=NOT A |
0 | 1 |
1 | 0 |
2.AND Gate- It is logic circuit has two input and one output. The operation of gate is such that output of gate is binary 1 if and only if all input are binary 1. If any of the input is binary 0 we will receive output as binary 0. Truth table of AND gate are as follows-
Number of stage possible = 2^{n}
=2^{2} = 4
Input | Output |
A | B | Y=A.B |
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
3.OR Gate-Or gate is another basic logic gate like AND gate it as two input and one output. The operation of gate is such that output of gate is binary 1 if any of the input is binary low and we will receive logic zero only when both the inputs are low. Truth table of OR gate are as follows-
Number of stage possible = 2^{n}
=2^{2} = 4
Input | Output |
A | B | Y=A+B |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
4.NAND Gate- The term NAND is a contraction of the expression NOT and AND gate. Therefore a NAND gate is an AND gate followed by the inverter. The operation of gate is such that output of gate is binary 1 if any of the input is binary low and we will receive logic zero only when both the inputs are high. Truth table and expression of NAND gate are as follows-
Input | Output |
A | B | Y=NOT(A AND B) |
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
For understanding this one should know about De Morgan’s theorem- It states that complement of a product is equal to the sum of the complements.
{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C} NOT (A And B)= NOT(A) {C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}+ NOT(B) ---- EQ 1
We have used two NAND gate and short the input of each gate so we will get output as
= NOT (A) AND NOT (B){C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}{C}
Now it is again supplied to another NAND gate and we will get output as-
= NOT (NOT (A) And NOT (B))
= [NOT (NOT) (A)]+ [NOT (NOT) (B)] (From EQ 1)
= A+ B