Implementing logic gates by using only NAND gates

Implementing logic gates by using only NAND gates


Unlocking the Power of NAND Gates: 

Implementing Complex Logic Expressions

NAND gate:

This type of gate is a NOT-AND gate, which is equivalent to an AND gate

then a NOT gate. If any of the inputs are low, the output of the NAND gate 

is high. An AND gate with a tiny circle on the output serves as the sign. 

The little circle is a representation of inversion.


Table:

A

B

~(A.B)

0

0

1

0

1

1

1

0

1

1

1

0


Diagram:



Objective:

It can be fairly determined that every Boolean function can be 

implemented with NAND gates if we are able to show that the logical 

operations ANDORXOR and XNOR can be implemented with NAND

gates.


IC Number:

The 7400 series is one of the widely used ICs that contains NAND gates.

1: Press on “P” at top Left corner .  

2: Type 7400 and press Enter Key.       

3: Final Result




                                           (1)                                                        (2)

 
                                                                               (3)


Task 1 : Verification of AND function

Observation:

        ·    By giving input ‘0’ and ‘0’ the output was ‘0’.

        ·        By giving input ‘0’ and ‘1’ and output was ‘0’.

        ·        By giving input ‘1’ and ‘0’ and output was ‘0’.

        ·        By giving input ‘1’ and ‘1’ and output was ‘1’

        ·        Above steps verify that it’s an AND gate.


A

B

F=A.B

0

0

0

0

1

0

1

0

0

1

1

1


Observation Table:


A

B

A.B

M=~(A.B)

~(M)

0

0

0

1

0

0

1

0

1

0

1

0

0

1

0

1

1

1

0

1

 

Note (Bar or ~ on A.B ( shows the Complement))!

 

AND gate uning NAND:

 


 

Task 2 : Verification of OR function

Observation:

        ·    By giving input ‘0’ and ‘0’ the output was ‘0’.

        ·        By giving input ‘0’ and ‘1’ and output was ‘1’.

        ·        By giving input ‘1’ and ‘0’ and output was ‘1’.

        ·        By giving input ‘1’ and ‘1’ and output was ‘1’

        ·        Above steps verify that it’s an OR gate.


A

B

F=A+B

0

0

0

0

1

1

1

0

1

1

1

1


Observation Table:


A

B

X=~(A)

Y=~(B)

X.Y

~(X.Y)=X+Y

0

0

1

1

1

0

0

1

1

0

0

1

1

0

0

1

0

1

1

1

0

0

0

1


Step 1: Take Complement of A and Store in X.

Step 2: Take Complement of B and Store in Y.

Step 3: Take AND of X, Y.

Step 4: Complement of ~A.~B gives A+B.


OR gate uning NAND:




Task 3 : Verification of XOR function

Observation:

        ·    By giving input ‘0’ and ‘0’ the output was ‘0’.

        ·        By giving input ‘0’ and ‘1’ and output was ‘1’.

        ·        By giving input ‘1’ and ‘0’ and output was ‘1’.

        ·        By giving input ‘1’ and ‘1’ and output was ‘0’

        ·        Above steps verify that it’s an XOR gate.


A

B

A⊕B

0

0

0

0

1

1

1

0

1

1

1

0


Observation Table:

 

A

B

C=NAND

X=A.C

Y=B.C

~X

~Y

M=~X.~Y

~M

0

0

1

0

0

1

1

1

0

0

1

1

0

1

1

0

0

1

1

0

1

1

0

0

1

0

1

1

1

0

0

0

1

1

1

0


Step 1 : Column C store the Values According to NAND operation .

Step 2 : Apply AND operation on A and C , store them in Column X.

Step 3 : Apply AND operation on B and C , store them in Column Y.

Step 4 : Take complement of X and Y .

Step 5 : Again apply AND operation on Complement of X and Y, store 

             them in Column M.

Step 6 : Take Complement of M after that we get XOR by using only 

             NAND.


XOR gate uning NAND:

 


Task 4 : Verification of XNOR function 

Observation:

        ·    By giving input ‘0’ and ‘0’ the output was ‘1’.

        ·        By giving input ‘0’ and ‘1’ and output was ‘0’.

        ·        By giving input ‘1’ and ‘0’ and output was ‘0’.

        ·        By giving input ‘1’ and ‘1’ and output was ‘1’

        ·        Above steps verify that it’s an XNOR gate.     


A

B

~(A⊕B)

0

0

1

0

1

0

1

0

0

1

1

1

 

Observation Table:


A

B

C=NAND

X=A.C

Y=B.C

~X

~Y

M=~X.~Y

0

0

1

0

0

1

1

1

0

1

1

0

1

1

0

0

1

0

1

1

0

0

1

0

1

1

0

0

0

1

1

1

M=~M

~M

 

0

1

 

1

0

 

1

0

 

0

1

 

 

Step1  : Column C store the Values According to NAND operation .

Step2  : Apply AND operation on A and C , store them in Column X.

Step 3 : Apply AND operation on B and C , store them in Column Y.

Step 4 : Take complement of X and Y .

Step 5 : Again apply AND operation on Complement of X and Y, store 

             them in Column M.

Step 6 : Take Complement of M.

Step 7 : Again Complement of M after that we get XNOR by using only 

            NAND.


XNOR gate uning NAND:



   
Conclusion:

 

NAND

NOR

NOT

1

1

AND

2

3

OR

3

2

XOR

4

5

XNOR

5

4

The table shows how many gates are needed to build a certain gate 

using NAND or NOR. I-e 

I need 2 NAND gates to established AND gate or 3 NOR gates!


 

Post a Comment

0 Comments