The Wayback Machine - https://web.archive.org/web/20240915214605/https://www.geeksforgeeks.org/realization-of-logic-gate-using-universal-gates/
Open In App

Realization of Logic Gate Using Universal gates

Last Updated : 02 Sep, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

In Boolean Algebra, the NAND and NOR gates are called universal gates because any digital circuit can be implemented by using any one of these two i.e. any logic gate can be created using NAND or NOR gates only.

Every logic gate has a representation symbol. The below image shows a graphical representation of all logic gates. 

Graphical representation of logic gates.

Implementation of AND Gate using Universal Gates

Implementation using NAND Gates

The AND gate is developed using two NAND gates wherein the outputs are combined in such a way that only when both of the inputs are HIGH will the output be HIGH. The first NAND gate performs a standard NAND functions, the second NAND gate has both inputs tied to the output of the initial NAND gate as shown below. This particular configuration flips the output thus emulating the behaviors of an AND gate.

The AND gate can be implemented by using two NAND gates in the below fashion:

Implementation using NAND Gates

Implementation using NOR Gates

AND gate is developed from three NOR gates and the settings of this Gate is referred to as 111. The inputs are then transformed with the use of a NOR gate and then they are negated one more time by using two more NOR gates. Together, these create the AND function, meaning that all of the conditions set have to be met in order to pass.

Implementation of AND gate using only NOR gates as shown below

 Implementation using NOR Gates

Implementation of OR Gate using Universal Gates

Implementation Using NAND Gates

It is implemented using three NAND gates. The inputs are first inverted using two NAND gates having their inputs probed in parallel and then the inverted outputs are connected with the input of third NAND gate. The last NAND gate effectively performs the inverted signals to give the required OR gate function.

The OR gate can be implemented using the NAND gate as below

Implementation Using NAND Gates

Implementation using NOR Gates

The OR gate is created by using an inverse of the output of the NOR operation. An inverted form of the inputs is provided directly into the NOR gate while the output is provided in NOR gate using fixed inputs. This inversion gives the OR gate logic as shown below.

Implementation of OR gate using two NOR gates as shown in the picture below:

Implementation using NOR Gates

Implementation of NOT Gate using Universal gates.

Implementation using NAND Gates

A single NAND gate with ‘a’ and ‘b’ inputs connected respond to a NOT gate. The NOT gate function is achieved as the result of NAND operation because the input signal is inverted.

Implementation of NOT gate using a single NAND gate as shown in the picture below:

Implementation using NAND Gates

Implementation Using NOR Gates

A single NOR gate with joining of both inputs perform the function of NOT gate. The input is negated and the output thus obtained is the inversion that is characteristic of an NOT gate.

Implementation of NOT gate using a single NOR gate as shown in the picture below:

Implementation Using NOR Gates

Implementation of XOR Gate using Universal gates.

Implementation using NAND Gates

XOR gate can be implemented using four NAND gates as illustrated below. All these input signals are mixed in a way that first recognizes the disparities between the two inputs and grinds them to create the XOR output.

Implementation of XOR gate using four NAND gate as shown in the picture below

Implementation using NAND Gates

Implementation Using NOR Gates

The XOR gate is implemented by five gates and these gates are the NOR gates. The inputs are then passed through a number of NOR gates to remove all the non-exclusive conditions before the XOR is applied to them.

Implementation of XOR gate using five NOR gate as shown in the picture below:

Implementation Using NOR Gates

Implementation of XNOR Gate using Universal Gates

Implementation Using NAND Gate

XNOR gate is implemented by five NAND gates to make the circuit. The XOR logic is first obtained, and then the outgoing XOR signal is passed through a NAND gate that negates it to obtain the XNOR function.

Implementation of XNOR gate using five NAND gate as shown in the picture below:

Implementation Using NAND Gate

Implementation Using NOR Gate

The XNOR gate can be implemented using four NOR gates. The XOR logic is then allowed to pass through a NOR gate, and the logic of output obtained will be the XNOR.

Implementation of XNOR gate using four NOR gate as shown in the picture below:

 Implementation Using NOR Gate

Implementation of NOR Gate using NAND Gates

NOR gate is formed by using four NAND gates. The first two gates perform the operation of inversion of inputs while the subsequent two gates perform the normal NOR operation.

Implementation of NOR gate using four NAND gate as shown in the picture below:

Implementation of NOR Gate using NAND Gates

Implementation of NAND Gate using NOR Gates

The NAND gate is made using four NOR gates. The first two gates invert the inputs, and next two gates perform the operations equivalent to NAND operation by these inverted signals.

Implementation of NAND gate using four NOR gate as shown in the picture below

img

Advantages of Using Universal Gates

  • 1) Simplicity: These are gates that can be used for all forms of logical operations hence can help reduce the number of components in a circuit.
  • 2) Cost-Effective: Less part are required when developing one type of gate only thus lowering costs of manufacturing.
  • 3) Flexibility: Universal gates can perform any digital logic function which makes it convenient to design any type of circuit.
  • 4) Reliability: The dependence of a small number of various gates can result in increased reliability in digital circuits.
  • 5) Ease of Integration: Universal gates can be readily incorporated into existing systems to suit even complex designs.

Disadvantages of Using Universal Gates

  • 1) Increased Gate Count: Complex logic functions are more difficult to construct using only NAND or NOR gates in that they take up more gates than other basic gates.
  • 2) Higher Power Consumption: Additional gates can cause more power consumption and this is experienced in complex circuits.
  • 3) Slower Speed: Extra gates can also bring in more propagation delay, and hence lower the speed of the circuit.
  • 4) Complex Design: The circuit design becomes more complicated because of a high number of universal gates the functions contain.
  • 5) Limited Optimization: The use of only one type of gate may offer fewer optimization possibilities and therefore result in less efficient designs.

Applications of Universal Gates

  • 1) Basic Digital Circuits: Universal gates are employed widely in elementary digital circuits for carrying out simple logical operations.
  • 2) Memory Units: NAND and NOR gates are used in memory storage elements such as SRAM and DRAM among others in the manufacture of devices that are used in the modern world.
  • 3) Arithmetic Logic Units (ALUs): The universal gates are used in ALUs to transform constant and variable, arithmetic and logical operations with the aid of processors.
  • 4) Signal Processing: In filter design and other communication processing systems popularly known as modulation techniques, universal gates are employed.
  • 5) Embedded Systems: Universal gates play a significant role in the construction of small scale circuits to be used in the embedded systems applications.

Conclusion

In this article the author clearly explained the different circuits for the NAND and NOR gates and how these gates can be used as universal gate for constructing various other gates in the digital circuits. Although they have some demerits like possessing a higher gate count and possible delays in the circuit are appeared; still, they play a vital role in designing simple/complex digital systems as they assist in reducing the cost.

Frequently Asked Questions on Realization of Logic Gate Using Universal gates- FAQs

What is the performance characteristic of universal gates in connection with other logic gates?

Universal gates tend to be relatively slow, both in terms of speed and the amount of power they use when compared to exclusive logic gates for special operations, because they require additional stages of gates.

Are an Universal Gates used in analog circuits?

Universal gates are used to perform digital logic operations and not to be used in the analog circuits. Analog circuits, in general, utilize other parts and mechanisms of operation.

In large scale digital designs what is wrong with Universals gates?

In large scale, the gates complicate the design, since more numbers of universal gates need to be implemented in order to perform the same logic functions like the specialized gates.



Previous Article
Next Article

Similar Reads

Universal Logic Gates
A logic gate is an active electronic component that uses one or more inputs to produce an output based on the bolean algebra each gate is designed to perform. Though there are various types of gates including AND, OR, NOT, NAND, NOR etc.. NAND and NOR gates are a little special. NAND gate and NOR gate can be termed as universal logic gates since an
7 min read
VHDL code for AND and OR Logic Gates
Prerequisite - Introduction of Logic Gates Design and implement the AND and OR logic gates using VHDL (VHSIC Hardware Description Language) programming language. Different Types of VHDL Modelling Styles The architecture of VHDL code is written in three different coding styles : Dataflow Modelling Behavioral ModellingStructural Modelling 1. Logic De
2 min read
Control Logic Gates in Computer Organization
Control Logic Gates is the hardware component of a basic computer. It comprises some inputs and outputs. The diagram given below is related to the hardwired control organization. The diagram below consists of the instruction register which has three parts: the I bit (15), the operation code (12, 13, 14), and bits 0 through 11. The symbols as D0 to
2 min read
Binary Adder with Logic Gates
Binary Adder and logic gates are important elements in digital logic. Binary adders are circuit which adds two binary numbers and results in the sum of the two binary numbers. Logic gates are the circuit in which a signal can pass through if a logic is applied through it. In this article we will discuss about the binary adder with logic gates, bina
8 min read
Introduction of Logic Gates
In Boolean Algebra, there are three basic operations, [Tex]+,\:.\:,\:^\prime       [/Tex]which are analogous to disjunction, conjunction, and negation in propositional logic. Each of these operations has a corresponding logic gate. Apart from these, there are a few other logic gates as well. It was invented by George Boole. Table of Content What is
9 min read
Basic Conversion of Logic Gates
In the Digital System, logic gates are the basic building blocks.  In these logic gates, we can find the gates having more than one input, but will have only one output. The connection between the input and the output of a gate is based on some logic. Based on this logic, different gates are developed like OR gate, AND gate, NOT gate, and more.   T
6 min read
Program to Implement Logic Gates
In a computer, most of the electronic circuits are made up logic gates. Logic gates are used to create a circuit that performs calculations, data storage or shows off object-oriented programming especially the power of inheritance. Logic gates can also be constructed using vacuum tubes, electromagnetic elements like optics, molecule etc. What is Lo
8 min read
Two Level Implementation of Logic Gates
The term "two-level logic" refers to a logic design that uses no more than two logic gates between input and output. This does not mean that the entire design will only have two logic gates, but it does mean that the single path from input to output will only have two logic gates. In two-level logic, irrespective of the total number of logic gates,
10 min read
Universal Shift Register in Digital logic
A Universal shift register is a register which has both the right shift and left shift with parallel load capabilities. Universal shift registers are used as memory elements in computers. A Unidirectional shift register is capable of shifting in only one direction. A bidirectional shift register is capable of shifting in both the directions. The Un
2 min read
Difference between Programmable Logic Array and Programming Array Logic
Programmable Logic Array (PLA) and Programming Array Logic (PAL) are the categories of programming logic devices. In PLA or Programmable Logic Array, there are massive functions can be implemented. Whereas in PAL or Programmable Array Logic, there is finite functions can be implemented. The distinction between PLA and PAL is that, PAL have programm
5 min read
Implementation of Full Adder using NOR Gates
In Digital Logic Circuit, Full Adder is a Digital Logic Circuit that can add three inputs and give two outputs. The three inputs A, B, and input carry as Cin. Cout is represented as output carry and Sum is represented as output. We can say Cout is called the majority 1’s detector, when more than one input is high (logic 1) then its output will be h
8 min read
Implementation of Full Adder using NAND Gates
In Digital Logic Circuit, Full Adder is a Digital Logic Circuit that can add three inputs and give two outputs. The three inputs such as A, B, and input carry as Cin. The output carry is represented as Cout and the normal output is represented as S, Sum. The Cout is also known as the majority 1’s detector, whose output goes high when more than one
9 min read
Half Adder and Half Subtractor using NAND NOR gates
Introduction : A Half Adder is a digital circuit that adds two single-bit binary numbers and outputs the sum and carry. It can be implemented using either NAND gates or with NOR gates. When using NAND gates : The sum output is given by A AND B. The carry output is given by the complement of A AND B. ​ ​W​hen NOR gate is used : The sum output is NOR
5 min read
Digital Logic and Design - GATE CSE Previous Year Questions
Solving GATE Previous Year's Questions (PYQs) not only clears the concepts but also helps to gain flexibility, speed, accuracy, and understanding of the level of questions generally asked in the GATE exam, and that eventually helps you to gain good marks in the examination. Previous Year Questions help a candidate practice and revise for GATE, whic
4 min read
CMOS Logic Gate
The logic gates are the basic building blocks of all digital circuits and computers. These logic gates are implemented using transistors called MOSFETs. A MOSFET transistor is a voltage-controlled switch. The MOSFET acts as a switch and turns on or off depending on whether the voltage on it is either high or low. There are two types of MOSFETs: NMO
4 min read
Difference Between Call Gate, Interrupt Gate, Trap Gate
Gate is used to transfer performance control across all segments. The level of rights assessment is done differently depending on the type of site and the instructions used. Other than that these three gates are almost identical except that Call Gate has parameters for calculating parameters, and that these three gates have different types of field
5 min read
GATE Mock Test Series Free - GATE CS/IT or GATE Data Science and Artificial Intelligence
Are you a GATE aspirant with CS/IT? If yes, you must be occupied by your GATE 2025 Exam preparations. As you know, the GATE 2025 Exam is set to occur in February 2025. You must want to analyze your preparation and performance for the GATE 2025 Exam. Boost your preparation with GeeksforGeeks's FREE GATE CS 2025 - All India Mock or GATE Data Science
5 min read
Half Adder in Digital Logic
Introduction: A half adder is a digital logic circuit that performs binary addition of two single-bit binary numbers. It has two inputs, A and B, and two outputs, SUM and CARRY. The SUM output is the least significant bit (LSB) of the result, while the CARRY output is the most significant bit (MSB) of the result, indicating whether there was a carr
4 min read
Full Subtractor in Digital Logic
A full subtractor is a combinational circuit that performs subtraction of two bits, one is minuend and other is subtrahend, taking into account borrow of the previous adjacent lower minuend bit. This circuit has three inputs and two outputs. The three inputs A, B and Bin, denote the minuend, subtrahend, and previous borrow, respectively. The two ou
3 min read
Encoder in Digital Logic
An encoder is a digital circuit that converts a set of binary inputs into a unique binary code. The binary code represents the position of the input and is used to identify the specific input that is active. Encoders are commonly used in digital systems to convert a parallel set of inputs into a serial code. The basic principle of an encoder is to
6 min read
Shift Registers in Digital Logic
Pre-Requisite: Flip-Flops Flip flops can be used to store a single bit of binary data (1 or 0). However, in order to store multiple bits of data, we need multiple flip-flops. N flip flops are to be connected in order to store n bits of data. A Register is a device that is used to store such information. It is a group of flip-flops connected in seri
8 min read
Consensus Theorem in Digital Logic
Prerequisite - Properties of Boolean algebra, Minimization of Boolean Functions Redundancy theorem is used as a Boolean algebra trick in Digital Electronics. It is also known as Consensus Theorem: AB + A'C + BC = AB + A'C The consensus or resolvent of the terms AB and A'C is BC. It is the conjunction of all the unique literals of the terms, excludi
3 min read
Variable Entrant Map (VEM) in Digital Logic
Prerequisite - Karnaugh Map (K-map) K-map is the best manual technique to solve Boolean equations, but it becomes difficult to manage when number of variables exceed 5 or 6. So, a technique called Variable Entrant Map (VEM) is used to increase the effective size of k-map. It allows a smaller map to handle large number of variables. This is done by
3 min read
Static Hazards in Digital Logic
A hazard, if exists, in a digital circuit causes a temporary fluctuation in the output of the circuit. In other words, a hazard in a digital circuit is a temporary disturbance in the ideal operation of the circuit which if given some time, gets resolved itself. These disturbances or fluctuations occur when different paths from the input to output h
4 min read
Ring Counter in Digital Logic
A ring counter is a typical application of the Shift register. The ring counter is almost the same as the shift counter. The only change is that the output of the last flip-flop is connected to the input of the first flip-flop in the case of the ring counter but in the case of the shift register it is taken as output. Except for this, all the other
3 min read
5 variable K-Map in Digital Logic
Prerequisite - Implicant in K-Map Karnaugh Map or K-Map is an alternative way to write a truth table and is used for the simplification of Boolean Expressions. So far we are familiar with 3 variable K-Map & 4 variable K-Map. Now, let us discuss the 5-variable K-Map in detail. Any Boolean Expression or Function comprising of 5 variables can be s
5 min read
Self Dual functions in Digital Logic
A function is said to be Self dual if and only if its dual is equivalent to the given function, i.e., if a given function is f(X, Y, Z) = (XY + YZ + ZX) then its dual is, fd(X, Y, Z) = (X + Y).(Y + Z).(Z + X) (fd = dual of the given function) = (XY + YZ + ZX), it is equivalent to the given function. So function is self dual. In a dual function: AND
2 min read
Adders and Subtractors in Digital Logic
Subtraction of two binary numbers can be accomplished by adding 2's complement of the subtrahend to the minuend and disregarding the final carry if any. If the MSB bit in the result of addition is a '0'. then the result of addition is the correct answer. If the MSB bit is a '1'. , this implies that the answer has a negative sign. The true magnitude
4 min read
Array Multiplier in Digital Logic
An array multiplier is a digital combinational circuit used for multiplying two binary numbers by employing an array of full adders and half adders. This array is used for the nearly simultaneous addition of the various product terms involved. To form the various product terms, an array of AND gates is used before the Adder array. Checking the bits
3 min read
Serial Binary Adder in Digital Logic
Serial binary adder is a combinational logic circuit that performs the addition of two binary numbers in serial form. Serial binary adder performs bit by bit addition. Two shift registers are used to store the binary numbers that are to be added. A single full adder is used to add one pair of bits at a time along with the carry. The carry output fr
2 min read
Article Tags :