Professional Documents
Culture Documents
Design and Implementation of Digital Circuit
Design and Implementation of Digital Circuit
Digital systems are said to be constructed by using logic gates. These gates are the AND, OR,
NOT, NAND, NOR, EXOR and EXNOR gates. The basic operations are described below with
the aid of truth tables.
AND gate
The AND gate is an electronic circuit that gives a high output (1) only if all its inputs are high.
A dot (.) is used to show the AND operation i.e. A.B. Bear in mind that this dot is sometimes
omitted i.e. AB
OR gate
The OR gate is an electronic circuit that gives a high output (1) if one or more of its inputs are
high. A plus (+) is used to show the OR operation.
NOT gate
The NOT gate is an electronic circuit that produces an inverted version of the input at its output.
It is also known as an inverter. If the input variable is A, the inverted output is known as NOT
A. This is also shown as A', or A with a bar over the top, as shown at the outputs. The diagrams
below show two ways that the NAND logic gate can be configured to produce a NOT gate. It can
also be done using NOR logic gates in the same way.
NAND gate
This is a NOT-AND gate which is equal to an AND gate followed by a NOT gate. The outputs
of all NAND gates are high if any of the inputs are low. The symbol is an AND gate with a small
circle on the output. The small circle represents inversion.
NOR gate
This is a NOT-OR gate which is equal to an OR gate followed by a NOT gate. The outputs of all
NOR gates are low if any of the inputs are high.
The symbol is an OR gate with a small circle on the output. The small circle represents inversion.
EXOR gate
The 'Exclusive-OR' gate is a circuit which will give a high output if either, but not both, of its
two inputs are high. An encircled plus sign ( ) is used to show the EOR operation.
EXNOR gate
The 'Exclusive-NOR' gate circuit does the opposite to the EOR gate. It will give a low output
if either, but not both, of its two inputs are high. The symbol is an EXOR gate with a small
circle on the output. The small circle represents inversion.
The NAND and NOR gates are called universal functions since with either one the AND and
OR functions and NOT can be generated.
Note:
A function in sum of products form can be implemented using NAND gates by replacing all
AND and OR gates by NAND gates.
A function in product of sums form can be implemented using NOR gates by replacing all AND
and OR gates by NOR gates.
The traditional symbols have distinctive shapes making them easy to recognise so they
are widely used in industry and education.
Inputs and outputs
Gates have two or more inputs, except a NOT gate which has
only one input. All gates have only one output. Usually the
letters A, B, C and so on are used to label inputs, and Q is
used to label the output. On this page the inputs are shown on
the left and the output on the right.
Logic ICs
4000 Series
74 Series
The 4000 and 74HC families are the best for battery powered projects because they will work
with a good range of supply voltages and they use very little power. However, if you are using
them to design circuits and investigate logic gates please remember that all unused inputs MUST
be connected to the power supply (either +Vs or 0V), this applies even if that part of the IC is not
being used in the circuit!
The output Q is true when the input A is NOT true, the output is the inverse of the
input: Q = NOT A
A NOT gate can only have one input. A NOT gate is also called an inverter.
Input A Output Q
0 1
1 0
AND gate
The output Q is true if input A AND input B are both true: Q = A AND B
An AND gate can have two or more inputs, its output is true if all inputs are true.
Input A Input B Output Q
0 0 0
0 1 0
1 0 0
1 1 1
This is an AND gate with the output inverted, as shown by the 'o' on the output.
The output is true if input A AND input B are NOT both true: Q = NOT (A AND B)
A NAND gate can have two or more inputs, its output is true if NOT all inputs are true.
0 0 1
0 1 1
1 0 1
1 1 0
OR gate
The output Q is true if input A OR input B is true (or both of them are true): Q = A OR B
An OR gate can have two or more inputs, its output is true if at least one input is true.
Input A Input B Output Q
0 0 0
0 1 1
1 0 1
1 1 1
This is an OR gate with the output inverted, as shown by the 'o' on the output.
The output Q is true if NOT inputs A OR B are true: Q = NOT (A OR B)
A NOR gate can have two or more inputs, its output is true if no inputs are true.
0 0 1
0 1 0
1 0 0
1 1 0
The output Q is true if either input A is true OR input B is true, but not when both of them are
true: Q = (A AND NOT B) OR (B AND NOT A)
This is like an OR gate but excluding both inputs being true.
The output is true if inputs A and B are DIFFERENT.
EX-OR gates can only have 2 inputs.
Input A Input B Output Q
0 0 0
0 1 1
1 0 1
1 1 0
This is an EX-OR gate with the output inverted, as shown by the 'o' on the output.
The output Q is true if inputs A and B are the SAME (both true or both
false): Q = (A AND B) OR (NOT A AND NOT B)
EX-NOR gates can only have 2 inputs.
0 0 1
0 1 0
1 0 0
1 1 1
Table 2 is a summary truth table of the input/output combinations for the NOT gate together with
all possible input/output combinations for the other gate functions. Also note that atruth
table with 'n' inputs has 2n rows. You can compare the outputs of different gates.
You should recall from the chapter on logic gates that inverting all inputs to a gate reverses that
gate's essential function from AND to OR, or vice versa, and also inverts the output. So, an OR
gate with all inputs inverted (a Negative-OR gate) behaves the same as a NAND gate, and an
AND gate with all inputs inverted (a Negative-AND gate) behaves the same as a NOR gate.
DeMorgan's theorems state the same equivalence in "backward" form: that inverting the output
of any gate results in the same function as the opposite type of gate (AND vs. OR) with inverted
inputs:
l
ong bar extending over the term AB acts as a grouping symbol, and as such is entirely different
from the product of A and B independently inverted. In other words, (AB)' is not equal to A'B'.
Because the "prime" symbol (') cannot be stretched over two variables like a bar can, we are
forced to use parentheses to make it apply to the whole term AB in the previous sentence. A bar,
however, acts as its own grouping symbol when stretched over more than one variable. This has
profound impact on how Boolean expressions are evaluated and reduced, as we shall see.
In digital circuit design, the selector wires are of digital value. In the case of a 2-to-1 multiplexer,
a logic value of 0 would connect to the output while a logic value of 1 would connect to the
output. In larger multiplexers, the number of selector pins is equal to where is the number of
inputs.
For example, 9 to 16 inputs would require no fewer than 4 selector pins and 17 to 32 inputs
would require no fewer than 5 selector pins. The binary value expressed on these selector pins
determines the selected input pin.
A 2-to-1 multiplexer has a boolean equation where and are the two inputs, is the selector input,
and is the output:
A 2-to-1 mux
1 1 1
1 0 1
0
0 1 0
0 0 0
1 1 1 1
1 0 0
0 1 1
0 0 0
This truth table shows that when then but when then .A
straightforward realization of this 2-to-1 multiplexer would need 2 AND gates, an OR gate,
and a NOT gate.
Larger multiplexers are also common and, as stated above, requires selector pins
for n inputs. Other common sizes are 4-to-1, 8-to-1, and 16-to-1. Since digital logic uses
binary values, powers of 2 are used (4, 8, 16) to maximally control a number of inputs for
the given number of selector inputs.