Professional Documents
Culture Documents
Digital Electronics Basics: Combinational Logic
Digital Electronics Basics: Combinational Logic
January 2005
0 1 0 1 0 0 1 0 1 1 0
C.K. Tse: Digital Electronics: Combinational Logic 2
Digital signals
Of course, in practical generation and detection of digital signals, exact values of the assumed voltage levels are not possible. Noise Margins:
5V VOH VOL
0V
VIH VIL
0 1 0 1 0 0 1 0 1 1 0
Generation: Any voltage higher than VOH is HIGH. (VOH = 2.4V*) Any voltage lower than VOL is LOW. (VOL = 0.4V) Any voltage higher than VIH is HIGH. (VIH = 2.0V) Any voltage lower than VIL is LOW. (VIL = 0.8V)
* for TTL logic which is a particular kind of logic circuit family.
Detection:
Logic
What can a digital circuit do? The simplest task we can think of is a combinational type of logic decision. For example, we can design a digital electronic circuit to make an instant decision based on some information. Here we emphasize instant in the decision making process. That means, the process has no time delay. X = todays weather is good Y = today is a holiday decision Z = go to picnic Suppose our rule is Z = X and Y The circuit is a simple AND gate.
X Y
Truth tables
A easy way to represent a combinational logic result is to tabulate all possible inputs.
X 0 0 1 1
Y 0 1 0 1
Z 0 0 0 1
X 0 0 1 1
Y 0 1 0 1
Z 0 1 1 1
X 0 1
Z 1 0
Truth table of OR X Z Y
X 0 0 1 1
Y 0 1 0 1
Z 1 1 1 0
X 0 0 1 1
Y 0 1 0 1
Z 1 0 0 0
X 0 0 1 1
Y 0 1 0 1
Z 0 1 1 0
Boolean algebra
Logic can also be expressed in algebraic form.
X 0 0 1 1 Y 0 1 0 1 Z 0 0 0 1
Z = X.Y
X Y AND gate
X 0 0 1 1
Y 0 1 0 1
Z 1 1 1 0
Z = X.Y
X Y X Y NAND gate
Z Z
Boolean algebra
Logic can also be expressed in algebraic form.
X 0 0 1 1 Y 0 1 0 1 Z 0 1 1 1
Z = X+Y
X Y OR gate
Truth table of OR
X 0 0 1 1
Y 0 1 0 1
Z 1 0 0 0
Z = X+Y
X Y X Y NOR gate
Z Z
Z = X .Y + X.Y + X.Y
More examples
X 0 0 1 1 X 0 0 1 1 Y 0 1 0 1 Y 0 1 0 1 Z 1 1 1 0 Z 1 0 0 0 The expression for Z is
Z = X .Y + X .Y + X.Y
Z = X .Y
Question: These are NAND and NOR gates! Can they be simplied or converted back to the originally derived forms? How can we do it?
C.K. Tse: Digital Electronics: Combinational Logic 9
Circuit realization
X
Z = X .Y + X .Y + X.Y
Y Z
Note: This is same as a NAND gate (see the truth table), and hence should be the same as
X Y
So, for each of x, y and z, we need a number of inverters, plus 4 AND gates and a multi-input OR gates.
11
Example:
Z = X .Y + X .Y + X.Y = X .(Y + Y ) + X.Y = X .1+ X.Y = X + X.Y = (X.(X + Y )) = (X.X + X.Y ) = X.Y
Y +Y =1 X .1 = X
De Morgan law Distributive
X .X = 0
13
Example:
Z = X .Y + X.Y + X.Y = (X + X).Y + X.Y = Y + X.Y = Y .(X.Y ) = Y .(X + Y ) = X .Y + 0 = X .Y = X +Y
De Morgan law De Morgan law
Y .Y = 0
De Morgan law
Boolean algebra can be tedious. Is there any easier method to simplify the min-term expression?
15
Karnaugh Maps
A very useful design tool for simplifying combinational logic. X 0 0 1 1 Y 0 1 0 1 Z 1 1 1 0 The expression for Z is
Z = X .Y + X .Y + X.Y
Y
0 1
Y X
0 1
1 1
1 0
X X
1 1
Y
1 0
X X
1 1
1 0
X.Y
Therefore Z = X + Y
C.K. Tse: Digital Electronics: Combinational Logic
or
Z = X.Y
16
Procedure:
1. 2. 011 3. Circle clusters of 1. Determine the logic expressions for each cluster. Add them up.
}
00 01
a
111
bc
0 1
11
a{
a{
0 0 1 1 1 0 1 0 } }
}
10
110
ab
Hence, we get
}
c
100
abc
bc
C.K. Tse: Digital Electronics: Combinational Logic
x = a.b.c + b.c + a .b
17
}
00 01
a 0 0 0 0 1 1 1 1
Binary b 0 0 1 1 0 0 1 1
c 0 1 0 1 0 1 0 1
Gray code x y z 0 0 0 0 0 1 0 1 1 0 1 0 1 1 0 1 1 1 1 0 1 1 0 0
bc
0 1
11
a{
a{
0 0 1 1 1 1 0 0 }
y = ab + a b
}
00 01
bc
0 1
00
01
11
10
bc
0 1
11
a{
a{
0 0 0 0 1 1 1 1 }
c
a{
a{
0 1 0 1 0 1 0 1 } }
c
C.K. Tse: Digital Electronics: Combinational Logic
x=a
z = b c + bc
}
10
}
10
}
b
}
c
c
18
x=a
y = ab + a b
z = b c + bc
a b c
z x y
19
00 00 01 11 10
{
01
11
{
10
{ {
}b
}
}b
}
d
{
d
20
Example
Procedure:
1. 2. 3. Circle clusters of 1. Determine the logic expressions for each cluster. Add them up.
cd ab
a
00 00 01 11 10
{ {
1 1 1 0 {
d
{
01
11
{
10
1 1 1 0
d
0 1 1 1
0 1 1 1 {
d
}b
ac
}
}b
b x = a c + b + ac
ac
21
Example
Derive the circuit for this combinational logic.
x = a c + b + ac
a c b x
22