LOGIC GATES
The NOT Circuit
The inverter (NOT circuit) performs the operation called inversion or complementation. The
inverter changes one logic level to the opposite level. In terms of bits, it changes a 1 to a 0
and a 0 to a 1.
Logic Circuit
Inverter Operation
When the input is LOW, the output is HIGH; when the input is HIGH, the output
is LOW, thereby producing an inverted output pulse.
The AND Circuit
The AND gate is one of the basic gates that can be combined to form any logic function.
An AND gate can have two or more inputs and performs what is known as logical
multiplication.
Logic Circuit
For a 2-input AND gate, output X is HIGH only when inputs A and B are HIGH;
X is LOW when either A or B is LOW, or when both A and B are LOW.
Page 21 of 63
The OR Circuit
The OR gate is another of the basic gates from which all logic functions are constructed.
An OR gate can have two or more inputs and performs what is known as logical addition.
Logic Circuit
For a 2-input OR gate, output X is HIGH when either input A or input B is HIGH,
or when both A and B are HIGH; X is LOW only when both A and B are LOW.
The NAND Circuit
The NAND gate is a popular logic element because it can be used as a universal gate; that
is, NAND gates can be used in combination to perform the AND, OR, and inverter operations.
Logic Circuit
For a 2-input NAND gate, output X is LOW only when inputs A and B are HIGH;
X is HIGH when either A or B is LOW, or when both A and B are LOW.
Page 22 of 63
The NOR Circuit
The NOR gate, like the NAND gate, is a useful logic element because it can also be used
as a universal gate; that is, NOR gates can be used in combination to perform the AND,
OR, and inverter operations.
Logic Circuit
For a 2-input NOR gate, output X is LOW when either input A or input B is
HIGH, or when both A and B are HIGH; X is HIGH only when both A and B are
LOW.
Exclusive-OR and exclusive-NOR
Exclusive-OR and exclusive-NOR gates are formed by a combination of other gates already
discussed, However, because of their fundamental importance
in many applications, these gates are often treated as basic logic elements with their own
unique symbols.
The Exclusive-OR Circuit
Logic Circuit
For an exclusive-OR gate, output X is HIGH when input A is LOW and input B is
HIGH, or when input A is HIGH and input B is LOW; X is LOW when A and B
are both HIGH or both LOW.
Page 23 of 63
The Exclusive-NOR Circuit
Like the XOR gate, an XNOR has only two inputs. The bubble on the output of the XNOR symbol
indicates that its output is opposite that of the XOR gate. When the two input logic levels
are opposite, the output of the exclusive-NOR gate is LOW. The operation can be stated as
follows (A and B are inputs, X is the output):
Logic Circuit
For an exclusive-NOR gate, output X is LOW when input A is LOW and input B is
HIGH, or when A is HIGH and B is LOW; X is HIGH when A and B are both
HIGH or both LOW.
Page 24 of 63
DEMORGAN’S THEOREMS
DeMorgan, a mathematician who knew Boole, proposed two theorems that are an important part
of Boolean algebra. In practical terms, DeMorgan’s theorems provide mathematical verification
of the equivalency of the NAND and negative-OR gates and the equivalency of the NOR and the
negative-AND gates.
DeMorgan’s first theorem is stated as follows:
The complement of a product of variables is equal to the sum of the complements of the variables.
In other words, it stated that:
The complement of two or more ANDed variables is equivalent to the OR of the complements of
the individual variables.
It is numerically written as:
not(X and Y) = (not X) or (not Y)
Demorgan’s second theorem is stated as follows:
The complement of a sum of variables is equal to the product of the complements of the variables.
In other words, it stated that:
The complement of a two or more ORed variables is equivalent to the AND of the complements
of the individual variables.
It is numerically written as:
not(X or Y) = (not X) and (not Y)
Recall the Rules of Boolean Algebra, many of them look identical to Matrix Operations in Linear
Algebra. At any rate, this permits a circuit designer to create a circuit as it comes to their mind,
Page 25 of 63
then manipulate the formula to generate an equivalent circuit that does the same thing but requires
less space. Consider the following rule as an example:
For D = (A * B) + (A * C), observe the following diagram:
Using the rule, generating an equivalent circuit that does the exact same thing, but be less
complicated, can be done with reasonable ease.
A * (B + C)
Example1: Applying DeMorgan’s Theorems
________
D = A * (B + C) [given formula]
_ _________
D = A + (B * C) [DeMorganised
_ _ _
D = A + (B * C) [DeMorganised
_ _ _ _
D = (A + B) * (A + C)
[A + (B * C) = (A + B) * (A + C)]
Page 26 of 63
Example2: Applying DeMorgan’s Theorems
Page 27 of 63