Electronics-Tutorials - Ws-Universal Logic Gates
Electronics-Tutorials - Ws-Universal Logic Gates
electronics-tutorials.ws/logic/universal-gates.html
Universal Logic gates can be used to produce any other logic or Boolean function with
the NAND and NOR gates being minimal
Individual logic gates can be connected together to form a variety of different switching
functions and combinational logic circuits. As we have seen throught this Digital Logic
tutorial section, the three most basic logic gates are the: AND, OR and NOT gates, and
given this set of logic gates it is possible to implement all of the possible Boolean
switching functions, thus making them a “full set” of Universal Logic Gates.
By using logical sets in this way, the various laws and theorems of Boolean Algebra can
be implemented with a complete set of logic gates. In fact, it is possible to produce every
other Boolean function using just the set of AND and NOT gates since the OR function
can be created using just these two gates. Likewise, the set of OR and NOT can be used
to create the AND function.
Any logic gate which can be combined into a set to realise all other logical functions is
said to be a universal gate with a complete logic set being a group of gates that can be
used to form any other logic function.
For example, AND and NOT constitute a complete set of logic, as does OR and NOT as
cascading together an AND with a NOT gate would give us a NAND gate. Similarly
cascading an OR and NOT gate together will produce a NOR gate, and so on. However,
the two functions of AND and OR on their own do not form a complete logic set.
So by using these three Universal Logic Gates we can create a range of other Boolean
functions and gates. However, the NAND and NOR gates are classed as minimal sets
because they have the property of being a complete set in themselves since they can be
used individually or together to construct many other logic circuits. Therefore we can
define the complete sets of operations of the main logic gates as follows:
1/5
Thus we can use these five sets of gates, together or individually as the building blocks to
produce more complex logic circuits called combinational logic circuits. But first let us
remind ourselves of the switching characteristics of the three basic logic gates, AND, OR
and NOT.
B A Q
0 0 0
0 1 0
1 0 0
1 1 1
The OR Function
In mathematics, the number or quantity obtained by adding two (or more) numbers
together is called the sum. In Boolean Algebra the OR function is the equivalent of
addition so its output state represents the addition of its inputs. In Boolean Algebra the
OR function is represented by a “plus” sign (+) so for a two input OR gate the Boolean
equation is given as: Q = A+B, that is Q equals either A OR B.
B A Q
0 0 0
0 1 1
1 0 1
1 1 1
2/5
The NOT Function
The NOT gate, which is also known as an “inverter” is given a symbol whose shape is
that of a triangle pointing to the right with a circle at its end. This circle is known as an
“inversion bubble”.
The NOT function is not a decision making logic gate like the AND, or OR gates, but
instead is used to invert or complement a digital signal. In other words, its output state will
always be the opposite of its input state.
The NOT gate symbol has a single input and a single output as shown.
A Q
0 1
1 0
The single input NOT gate or invert function can be cascaded with itself to produce what
is called a digital buffer. The first NOT gate will invert the input and the second will re-
invert it back to its original level performing a double inversion of the single input. Non-
inverting Digital Buffers have many uses in digital electronics as this double inversion of
the input can be used to provide digital amplification and circuit isolation.
3/5
Using the full AND, OR and NOT set of logic gates we can create the Boolean
expressions for the Exclusive-OR (Ex-OR) and the NOT Exclusive-OR (Ex-NOR) gates
as shown.
Note that neither the Exclusive-OR gate or the Exclusive-NOR gate can be classed as a
universal logic gate as they can not be used on their own or together to produce any
other Boolean function.
One of the main disdvantages of using the complete sets of AND, OR and NOT gates is
that to produce any equivalent logic gate or function we require two (or more) different
types of logic gate, AND and NOT, or OR and NOT, or all three as shown above.
However, we can realise all of the other Boolean functions and gates by using just one
single type of universal logic gate, the NAND (NOT AND) or the NOR (NOT OR) gate,
thereby reducing the number of different types of logic gates required, and also the cost.
The NAND and NOR gates are the complements of the previous AND and OR functions
respectively and are individually a complete set of logic as they can be used to implement
any other Boolean function or gate. But as we can construct other logic switching
functions using just these gates on their own, they are both called a minimal set of gates.
Thus the NAND and the NOR gates are commonly referred to as Universal Logic Gates.
Thus ALL other logic gate functions can be created using only NAND gates making it a
universal logic gate.
4/5
Universal Logic Gates using only NOR Gates
Thus ALL other logic gate functions can be created using only NOR gates making it also
a universal logic gate.
Note also that the implementation of the Exclusive-OR gate is more efficient using NAND
gates compared to using NOR gates, while the implementation of the Exclusive-NOR
gate is more efficient with NOR gates compared to using NAND gates as in each case
only four individual logic gates are required. In other words we can create all the Boolean
functions using just one 7400 NAND or one 7402 NOR chip including its various sub-
families.
Previous
Pull-up Resistors
64 Comments
View More
5/5