What is universal gates AND, OR and NOT gates using NAND gates and OR gates.


Q.) What is universal gates AND, OR and NOT gates using NAND gates and OR gates.

Subject: Digital Circuit and Design

Universal gates are logic gates that can be used to implement any other basic logic gate. The NAND and NOR gates are considered universal gates because they have the ability to create any type of gate including AND, OR, and NOT gates by using only NAND or only NOR gates. Below, we will explore how to create AND, OR, and NOT gates using NAND gates and OR gates.

Using NAND Gates

NOT Gate using NAND

A NOT gate can be created using a single NAND gate by connecting both inputs of the NAND gate to the same input signal. The truth table and the formula for a NOT gate are as follows:

Input Output (NOT)
0 1
1 0

Formula: ( \overline{A} = A \text{ NAND } A )

Example: If input A is 1, the output of the NAND gate with both inputs as A (1 NAND 1) will be 0, which is the NOT of A.

AND Gate using NAND

An AND gate can be created using two NAND gates. The first NAND gate acts as an inverter (NOT gate), and the second NAND gate combines the inverted outputs. The truth table and the formula for an AND gate are as follows:

Input A Input B Output (AND)
0 0 0
0 1 0
1 0 0
1 1 1

Formula: ( A \text{ AND } B = \overline{A \text{ NAND } B} )

Example: To create an AND gate, first take the NAND of inputs A and B, then take the NAND of the result with itself.

OR Gate using NAND

An OR gate can be created using three NAND gates. Two of the NAND gates are used to invert the inputs, and the third NAND gate combines the inverted inputs. The truth table and the formula for an OR gate are as follows:

Input A Input B Output (OR)
0 0 0
0 1 1
1 0 1
1 1 1

Formula: ( A \text{ OR } B = \overline{A} \text{ NAND } \overline{B} )

Example: To create an OR gate, first invert both inputs A and B using two NAND gates (acting as NOT gates), then take the NAND of the inverted A and inverted B.

Using OR Gates

Creating AND, OR, and NOT gates using only OR gates is not directly possible because OR gates are not universal gates. However, with the addition of NOT gates (inverters), you can create an AND gate. This is because De Morgan's Theorem states that the inversion of an OR operation is equivalent to an AND operation with inverted inputs:

( \overline{A + B} = \overline{A} \cdot \overline{B} )

To create an AND gate using OR gates and NOT gates, you would invert both inputs and then OR the inverted inputs together, followed by inverting the result. This is not as straightforward as using NAND gates, and it requires the use of NOT gates in addition to OR gates.

In summary, while NAND gates alone can be used to create AND, OR, and NOT gates, OR gates alone cannot. OR gates require the addition of NOT gates to create AND gates, and they cannot create a NOT gate by themselves.