Nand and Nor as Universal Gates

In this tutorial, you will learn about universal gates. You will see the implementation of NAND and NOR as universal gates by using them to create AND, OR & NOT operations.

Contents:

  1. Universal Gates
  2. Properties of NAND and NOR Gate
  3. NAND Gate as NOT Gate
  4. NAND Gate as AND Gate
  5. NAND Gate as OR Gate
  6. NOR Gate as NOT Gate
  7. NOR Gate as AND Gate
  8. NOR Gate as OR Gate

Universal Gates

A logic gate or a digital electronic block is said to be universal if it can implement any Boolean function using just itself and no other kind of gates. In general, if a gate can implement AND, OR & NOT function, it is considered as a universal gate.

The NAND & NOR gates are two such universal gates as they can implement the basic functions of AND, OR & NOT. A few more examples of universal gates apart from NAND & NOR are: –

  • Full adder
  • Inhibition gates, f = A.B’ and f = A’. B are known as inhibition gates.
  • Implication gates, f = A’ + B and f = B’ + A are known as implication gates.

Properties of NAND and NOR Gate

Here are the properties of NAND and NOR listed: –

advertisement
advertisement
  • Both are commutative.
    (A.B)’ = (B.A)’ and (A + B)’ = (B + A)’
  • Both are not associative. (A.(B.C)’)’ is not equal to ((AB)’C)’. Similarly, (A+(B+C)’)’ is not equal to ((A+B)’+C)’.
  • The enable input for NAND is 1 and its disable input is 0.
  • The enable input for NOR gate is 0 and disable input is 1.
  • NAND operation is also equivalent to bubbled OR operation which means inverted inputs to the OR gate as (A.B)’ = A’ + B’ from De Morgan’s law.
  • NOR operation is also equivalent to bubbled AND operation which means inverted inputs to the AND gate as (A+B)’ = B’.A’ from De Morgan’s law.

NAND Gate as NOT Gate

As we know, the NOT operation gives the complemented form of any input. If we give the same input to a NAND gate, then we will get, (A.A)’ which is equal to A’, thus we can create a NOT gate using just one NAND gate.

Here is the figure which shows this implementation.

NAND to NOT Conversion

As shown in the figure, only 1 NAND gate is used to make NOT gate.

NAND Gate as AND Gate

As we know, the NAND operation is the complement of AND operation. If we first obtain the NAND operation and then perform complement on it, we should get back the AND operation as applying complement twice gives us the same result back.
((A.B)’)’ = AB

Thus, we will need only two NAND gates to implement the AND gate. Here is a figure which shows this implementation.

NAND to AND Conversion

As shown in the figure, two NAND gates are required to make an AND gate.

advertisement

NAND Gate as OR Gate

From De-Morgan’s law, we know that (A.B)’ = A’ + B’ which means the NAND operation gets converted into bubbled OR operation. If we apply complemented inputs to the NAND gate, then by De Morgan’s law, we should get back an equivalent OR operation.
(A’. B’)’ = (A’)’ + (B’)’ = A’ + B’

To implement this, we will need three NAND gates, first two to complement the inputs and a third NAND gate to perform the NAND operation on it. Here is the figure which shows this implementation.

NAND to OR Conversion

As shown in the figure, three NAND gates are used to make an OR gate.

NOR Gate as NOT Gate

The NOR gate can be used to implement the NOT gate the same way as we used NAND to implement NOT. If we use the same variable as the input to a NOR gate, we will get (A + A)’ = A’ as from Boolean algebra, we get A + A = A.

advertisement

Thus, we can implement the NOT gate using 1 NOR gate. Here is a figure which shows this implementation.

NOR to NOT Conversion

As shown in the figure, only one NOR gate is required to make a NOT gate.

NOR Gate as OR Gate

The OR operation is the complemented form of NOR operation, thus we can obtain it by complementing the output of a NOR gate as ((A+B)’)’ = A + B. The OR function thus can be implemented using 2 NOR gates.

Here is a figure which shows this implementation.

NOR to OR Conversion

As shown in the figure, two NOR gates are required to make an OR gate.

NOR Gate as AND Gate

The AND gate can be implemented using NOR gate by applying De-Morgan’s law. As we know, (A+B)’ = A’. B’, so if we use complemented inputs to the NOR gate, we will get (A’ + B’)’ = (A’)’. (B’)’ = A.B.

Thus, we can obtain AND gate from NOR gate by first using two NOR gates to complement the input and then use the NOR function on it by using the third gate. Here is a figure which shows this implementation.

NOR to AND Conversion

As shown in the figure, three NOR gates are required to make an AND gate.

Key Points to Remember

Here are the key points to remember in “NAND and NOR as Universal Gates”.

  • Universal Gates are those which can implement any Boolean function using only one kind of gate.
  • Any digital component which can implement AND, OR & NOT logic is a universal gate.
  • NAND gate and NOR gate are the most widely used universal gates.
  • Both NAND & NOR gates are commutative but not associative.
  • One NAND, two NAND, and three NAND gates are required to convert into NOT, AND & OR functions respectively.
  • One NOR, two NOR, and three NOR gates are required to convert into NOT, OR & AND functions respectively.

If you find any mistake above, kindly email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.