Fundamentals of Digital Design
Fundamentals of Digital Design
[Read chapter 5 of the recommended text book –Digital Electronics with VHDL by
William Kleitz]
Synthesis is the task of designing a new logic network that implements a desired
functional behavior.
Example 1
Design a circuit to perform the following function. Two power lines are to be monitored
for the occurrence of HIGH voltage signals. The function of the circuit is to monitor the
state of two sensors attached to the power lines and output a high voltage to trigger an
alarm system whenever there is a HIGH (LOGIC 1) on either one or both power lines.
The function of the circuit is to continuously monitor the state of the sensors and produce
an output logic value 1, whenever the sensors are in the following state: (1, 0), (0, 1) and
1
(1, 1). In other words the required functional behavior of the circuit is that the output
must be equal to 1 whenever either or both of the sensors are at logic 1.
X Y A
0 0 0
1 0 1
0 1 1
1 1 1
A possible procedure for designing a logic circuit that implements the truth table shown
above is to create a product term for each valuation for which the output function A has a
value of 1.
X Y A
X.Y
0 0 0
1 0 1
minterms
0 1 1 X.Y
1 1 1
X.Y
The desired function is then the sum of these product (AND) terms hence, the name Sum
of Products (SoP) realization.
X .Y X .Y X .Y A
These expressions come in two forms: the Sum of products form is the type described
above and is normally referred to as the minterm form in engineering. The above logical
2
expression can also be achieved using the product of sum form which is called maxterm
form. However the examples described here employ the minterm form.
To construct the logic circuit, we start at the output and work towards the input. The
equation above shows that the output should be formed by a three input OR gate.
X .Y X .Y X .Y A
A
Fig 1
In the second step, an AND gate has been added to feed the X.Y input to the OR gate
x X
Y Y
Fig 2
Figure 3, below adds an AND gate to form the X.Y input to the OR gate.
x X
Y Y
X
A
Y
Fig 3
3
Finally fig 4 adds another AND gate to form the X.Y input
x X
Y Y
X
A
Y
X
Y
Fig 4.
Sum of Product and Product of Sum methods always produces a logical expression, but
usually is not the simplest or minimum expression.
Secondly the complexity of a given network has a direct impact on its cost. Because it is
always desirable to reduce the cost of any manufactured product, it is important to find
ways for implementing logic circuits as inexpensively as possible. It should be noted that
a given function can be implemented with a number of different networks. Some of these
networks are simpler than others, hence, searching for solutions that entail minimum cost
is prudent.
Boolean Algebra
Boolean algebra provides is a powerful tool that can be used for designing and analyzing
logic circuits. It provides the foundation for much of our modern digital technology.
Boolean algebra is based on a set of rules that are derived from a small number of basic
assumptions as shown below.
4
Single-Variable Theorems
1a.
1b.
2a.
2b.
3a.
3b.
4a.
4b.
5.
CORRECTION
LINE 4a should read X.X = 0
Boolean algebra finds its most practical use in the simplification of logic circuits. If we
translate a logic circuit's function into symbolic (Boolean) form, and apply certain
algebraic rules to the resulting equation to reduce the number of terms and/or arithmetic
operations, the simplified equation may be translated back into circuit form for a logic
5
circuit performing the same function with fewer components. If equivalent function may
be achieved with fewer components, the result will be increased reliability and decreased
cost of manufacture.
x X
Y Y
X
A
Y
X
Y
fig
A X .Y X .Y X .Y (1)
Applying the commutative law to the 2nd and 3rd term we can write the above as:
A X .Y X .Y X .Y (2)
Theorem 4b,
A X .1 X .Y (4)
Theorem 2a
A X X .Y (5)
DeMorgan,s theorem 7a
A X Y (6)
6
From equation 6, the problem stated in example 1 can be implemented with a simplified
circuit shown below. This is much simpler than the original circuit and yet performs the
same function.
X
A
Y
Example 2
Use Boolean expressions to derive a simplified form of the circuit shown below:
Our first step in simplification must be to write a Boolean expression for this circuit. This
task is easily performed step by step if we start by writing sub-expressions at the output
of each gate, corresponding to the respective input signals for each gate. Remember that
OR gates are equivalent to Boolean addition, while AND gates are equivalent to Boolean
multiplication.
7
The simplified circuit is thus shown below:
The final expression, B(A + C), is much simpler than the original, yet performs the same
function. If you would like to verify this, you may generate a truth table for both
expressions and determine Q's status (the circuits' output) for all eight logic-state
combinations of A, B, and C, for both circuits. The two truth tables should be identical.
8
SUMMARY
A circuit that utilizes more than 1 logic function has Combinational Logic. As an
example, if a circuit has an AND gate connected to an Inverter gate, this circuit has
combinational logic.
NAND Gate
A NAND gate is the combination of both an AND gate and a NOT gate. It operates on
the same as an AND gate but the output will be the opposite. Remember the NOT gate
does not always have to be on the output leg; it could be used to invert an Input signal
also.
9
Truth Table for the NAND Gate
A NOR gate is the combination of both an OR gate and a NOT gate. It operates the same
as an OR gate, but the output will be the opposite.
10
Universal Capability NAND and NOR
NAND and NOR gates are universal logic gates. The AND, OR, NOR and Inverter
functions can all be performed using only NAND gates. Also, the AND, OR, NAND and
Inverter functions can all be performed using only NOR gates. An inverter can be made
from a NAND or a NOR by connecting all inputs of the gate together. If the output of a
NAND gate is inverted, it becomes an AND function.
Here are the NAND equivalents of the various logic gates:
11
Here are the NOR equivalents of the various logic gates:
To simplify circuits containing NAND and NOR gates we use this theorem
De Morgan's theorem allows large bars in a Boolean Expression to be broken up
into smaller bars over individual variables.
De Morgan's theorem says that a large bar over several variables can be broken
between the variables if the sign between the variables is changed.
12
In order to reduce expressions with large bars, the bars must first be broken up.
This means that in some cases, the first step in reducing an expression is to use De
Morgan's theorem.
Example 1
X AB. B C
X A BB C
X AB AC BB BC
X AB AC BC
Example 2
X AB.C D . AB
X AB.C D AB
X AB C D AB
X A B C D A B
X A B C D
The Exclusive-OR, or XOR function is an interesting and useful variation on the basic
OR function. Verbally, it can be stated as, "Either A or B, but not both." The XOR gate
produces a logic 1 output only if its two inputs are different. If the inputs are the same,
the output is a logic 0.
13
The truth table for the XOR
The Exclusive-OR, or XOR function can be described verbally as, "Either A or B, but not
both." The circuit symbol for the XOR gate is shown below
The XOR symbol is a variation on the standard OR symbol. It consists of a plus (+) sign
with a circle around it. Unlike standard OR/NOR and AND/NAND functions, the XOR
function always has exactly two inputs.
The XNOR (exclusive-NOR) gate is a combination XOR gate followed by an inverter. Its
output is "true" if the inputs are the same, and "false" if the inputs are different.
14
Symbol of XNOR
Boolean expression:
Summary
Circuits called logic gates are the basic building blocks of computers and almost
all digital systems.
The fundamental logic gates are called AND, OR, NAND, and NOR.
15