chap_02-p1_2.pdf
TRANSCRIPT
-
7/26/2019 Chap_02-p1_2.pdf
1/33
Chapter 2
CombinationalLogic Circuits
Part 1 Gate Circuits and Boolean Equations
Logic and Computer Design Fundamentals
-
7/26/2019 Chap_02-p1_2.pdf
2/33
CAP223Chapter 2 - Part 1 2
Overview
Part 1Gate Circuits and Boolean Equations Binary Logic and Gates
Boolean Algebra
Standard Forms
Part 2Circuit Optimization Two-Level Optimization
Map Manipulation
Part 3Additional Gates and Circuits Other Gate Types
Exclusive-OR Operator and Gates
High-Impedance Outputs
-
7/26/2019 Chap_02-p1_2.pdf
3/33
CAP223Chapter 2 - Part 1 3
Binary Logic and Gates
Binary variables take on one of two values.
Logical operators operate on binary values and
binary variables.
Basic logical operators are the logic functionsAND, OR and NOT.
Logic gates implement logic functions.
Boolean Algebra: a useful mathematical system
for specifying and transforming logic functions.
We study Boolean algebra as foundation for
designing and analyzing digital systems.
-
7/26/2019 Chap_02-p1_2.pdf
4/33
CAP223Chapter 2 - Part 1 4
Binary Variables
Two binary values have different names: True/False
On/Off
Yes/No 1/0
We use 1 and 0 to denote the two values.
Variable identifier examples: A, B, y, z, or X1 for now
RESET, START_IT, or ADD1 later
-
7/26/2019 Chap_02-p1_2.pdf
5/33
CAP223Chapter 2 - Part 1 5
Logical Operations
The three basic logical operations are: AND
OR
NOT AND is denoted by a dot ().
OR is denoted by a plus (+).
NOT is denoted by an overbar ( ), asingle quote mark (') after, or (~) before
the variable.
-
7/26/2019 Chap_02-p1_2.pdf
6/33
CAP223Chapter 2 - Part 1 6
Examples: is read Y is equal to A AND B.
is read z is equal to x OR y.
is read X is equal to NOT A.
Notation Examples
Note: The statement:
1 + 1 = 2 (read one plus one equals two)
is not the same as
1 + 1 = 1 (read 1 or 1 equals 1).
= BAY
yxz
=
AX =
Arithmetic
Logic
-
7/26/2019 Chap_02-p1_2.pdf
7/33CAP223Chapter 2 - Part 1 7
Operator Definitions
Operations are defined on the values
"0" and "1" for each operator:
AND
0 0 = 0
0 1 = 0
1 0 = 01 1 = 1
OR
0 + 0 = 0
0 + 1 = 1
1 + 0 = 11 + 1 = 1
NOT
10=
01 =
-
7/26/2019 Chap_02-p1_2.pdf
8/33CAP223Chapter 2 - Part 1 8
01
10
X
NOT
XZ=
Truth Tables
Truth table a tabular listing of the values of afunction for all possible combinations of values on its
arguments
Example: Truth tables for the basic logic operations:
111
001
010
000
Z = XYYX
AND OR
X Y Z = X+Y
0 0 0
0 1 1
1 0 1
1 1 1
-
7/26/2019 Chap_02-p1_2.pdf
9/33CAP223Chapter 2 - Part 1 9
Logic Gates
Today, transistorsare used in buildinglogic gates.
Quadruple AND Chip Logic Diagram of a Quadruple AND Chip
-
7/26/2019 Chap_02-p1_2.pdf
10/33CAP223Chapter 2 - Part 1 10
(b) Timing diagram
X 0 0 1 1
Y 0 1 0 1
X Y(AND) 0 0 0 1
X 1 Y(OR) 0 1 1 1
(NOT) X 1 1 0 0
(a) Graphic symbols
OR gate
X
YZ 5 X 1 YZ 5 X Y
AND gate
X Z 5 X
NOT gate orinverter
Logic Gate Symbols and Behavior
Logic gates have special symbols:
And waveform behavior in time as follows:
= = =+
+
-
7/26/2019 Chap_02-p1_2.pdf
11/33CAP223Chapter 2 - Part 1 11
Logic Diagrams and Expressions
Boolean equations, truth tables and logic diagrams describethe same function.
Truth tables are unique; expressions and logic diagrams arenot. This gives flexibility in implementing functions.
X
Y F
Z
Logic Diagram
Equation
ZYXF
Truth Table
11 1 1
11 1 0
11 0 1
11 0 000 1 1
00 1 0
10 0 1
00 0 0
X Y Z ZYXF
-
7/26/2019 Chap_02-p1_2.pdf
12/33CAP223Chapter 2 - Part 1 12
1.
3.
5.
7.
9.
11.
13.
15.
17.
Commutative
Associative
Distributive
DeMorgans
2.
4.
6.
8.
X . 1 X=
X . 0 0=
X . X X=
0=X . X
Boolean Algebra
An algebraic structure defined on a set of at least two elements, B,together with three binary operators (denoted +, and ) thatsatisfies the following basic identities:
10.
12.
14.
16.
X + Y Y + X =
(X + Y) Z+ X + (Y Z)+=
X(Y + Z) XY XZ +=
X + Y X . Y=
XY YX =
(XY)Z X(YZ)=
X + YZ (X + Y)(X + Z)=
X . Y X + Y=
X + 0 X=
+X 1 1=
X + X X =
1=X + X
=
-
7/26/2019 Chap_02-p1_2.pdf
13/33CAP223Chapter 2 - Part 1 13
Boolean Operator Precedence
The order of evaluation in a Booleanexpression is:1. Parentheses
2. NOT3. AND4. OR
Parentheses almost always appear
around OR expressions
Example: F = A(B + C)(C + D)
-
7/26/2019 Chap_02-p1_2.pdf
14/33CAP223Chapter 2 - Part 1 14
Boolean Function Evaluation
x y z F1 F2 F3 F40 0 0 0 0
0 0 1 0 1
0 1 0 0 0
0 1 1 0 0
1 0 0 0 1
1 0 1 0 1
1 1 0 1 1
1 1 1 0 1
zxyxF4xzyxzyxF3
xF2xyF1
=
= zyz
y1
0
0
1
1
1
0
0
0
1
0
1
1
1
0
0
-
7/26/2019 Chap_02-p1_2.pdf
15/33CAP223Chapter 2 - Part 1 15
Expression Simplification
An application of Boolean algebra Simplify to contain the smallest number
of literals (complemented and
uncomplemented variables) and termsF= XYZ + XYZ + XZ
F= XY(Z + Z) + XZ
F= XY.1 +XZ
F= XY + XZ
-
7/26/2019 Chap_02-p1_2.pdf
16/33CAP223Chapter 2 - Part 1 16
Expression Simplification
-
7/26/2019 Chap_02-p1_2.pdf
17/33CAP223Chapter 2 - Part 1 17
Complementing Functions
The complement a function F, F, is obtained frominterchange of 1s to 0s and 0s for s for the valueof F in the truth table.
Can be derived algebraically by using DeMorgan's
Theorem :1.Interchange AND and OR operators
2.Complement each constant value and literal
Example: Complement F =
F = (x + y + z)(x + y + z)
Example: Complement G = (a + bc)d + e
G =
x zyzyx
((a + bc)d )e= ((a+ bc) + d) e = (a(bc) + d) e
= (a(b+c)+d) e
-
7/26/2019 Chap_02-p1_2.pdf
18/33CAP223Chapter 2 - Part 1 18
Canonical Forms
It is useful to specify Boolean functions in
a form that:
Allows comparison for equality.
Has a correspondence to the truth tables
Canonical Forms in common usage:
Sum of Minterms (SOM)
-
7/26/2019 Chap_02-p1_2.pdf
19/33CAP223Chapter 2 - Part 1 19
Minterms
Minterms are AND terms with everyvariablepresent in either true or complemented form.
Given that each binary variable may appearnormal (e.g., x) or complemented (e.g., ), there
are 2n
minterms for nvariables. Example: Two variables (X and Y)produce
22 = 4 combinations:
(both normal)
(X normal, Y complemented)(X complemented, Y normal)
(both complemented)
Thus there are four minterms of two variables.
YX
XY
YXYX
x
-
7/26/2019 Chap_02-p1_2.pdf
20/33CAP223Chapter 2 - Part 1 20
Examples: Two variable minterms
The index above is important for
describing which variables in the terms
are true and which are complemented.
Minterms
Index Binary Minterm
0 00 x y
1 01 x y
2 10 x y
3 11 x y
-
7/26/2019 Chap_02-p1_2.pdf
21/33CAP223Chapter 2 - Part 1 21
Standard Order
Minterms are designated with a subscript (index)
The subscript is a number, corresponding to a binary pattern
The bits in the pattern represent the complemented or normal
state of each variable listed in a standard order.
All variables will be present in a minterm and will be listed in
the same order (usually alphabetically)
Example: For variables a, b, c:
Minterms: a b c, a b c, a b c
Terms: a c b and c a b are NOT in standard order. Terms: a c, b c, and a b do not contain all variables
-
7/26/2019 Chap_02-p1_2.pdf
22/33CAP223Chapter 2 - Part 1 22
Purpose of the Index
The index for the minterm, expressed asa binary number, is used to determine
whether the variable is shown in the true
form or complemented form. For Minterms:
1 means the variable is NotComplemented and
0 means the variable is Complemented.
-
7/26/2019 Chap_02-p1_2.pdf
23/33
CAP223Chapter 2 - Part 1 23
Index Example in Three Variables
Example: (for three variables) Assume the variables are called X, Y, and
Z.
The standard order is X, then Y, then Z.
The Index 0 (base 10) = 000 (base 2) for
three variables). All three variables are
complemented for minterm 0 ( ) Minterm 0, called m0 is .
Minterm 6 ?
Z,Y,X
ZYX
-
7/26/2019 Chap_02-p1_2.pdf
24/33
CAP223Chapter 2 - Part 1 24
Index ExamplesFour Variables
Index Binary Mintermi Pattern mi
0 0000
1 0001
3 0011
5 0101
7 0111
10 101013 1101
15 1111
dcba
dcba
dcba
dcbadba
dcba
?
?
c
-
7/26/2019 Chap_02-p1_2.pdf
25/33
CAP223Chapter 2 - Part 1 25
Minterm Function Example
F(A, B, C, D, E) = m2 + m9 + m17 + m23
F(A, B, C, D, E) = ?
F(A,B,C,D,E) = ABCDE + ABCDE + ABCDE + ABCDE
-
7/26/2019 Chap_02-p1_2.pdf
26/33
CAP223Chapter 2 - Part 1 26
Canonical Sum of Minterms
Any Boolean function can be expressed as aSum of Minterms.
For the function table, the minterms used are theterms corresponding to the 1's
For expressions, expand all terms first to explicitlylist all minterms. Do this by ANDing any termmissing a variable v with a term ( ).
Example: Implement as a sum ofminterms.
First expand terms:
Then distribute terms:
Express as sum of minterms: f = m3 + m2 + m0
yxxf
yx)yy(xf
yxyxxyf
vv
-
7/26/2019 Chap_02-p1_2.pdf
27/33
CAP223Chapter 2 - Part 1 27
Another SOM Example
Example: There are three variables, A, B, and C
which we take to be the standard order.
Expanding the terms with missingvariables: ?
Collect terms (removing all but one ofduplicate terms): ?
Express as SOM: ?
CBAF
F = A(B + B)(C + C) + (A + A) B C
= ABC + ABC + ABC + ABC + ABC + ABC
ABC + ABC + ABC + ABC + ABC
F = m7 + m6 + m5 + m4 + m1 = m1 + m4 + m5 + m6 + m7
-
7/26/2019 Chap_02-p1_2.pdf
28/33
CAP223Chapter 2 - Part 1 28
Shorthand SOM Form
From the previous example, we started with:
We ended up with:
F = m1+m4+m5+m6+m7 This can be denoted in the formal shorthand:
Note that we explicitly show the standard
variables in order and drop the mdesignators.
)7,6,5,4,1()C,B,A(F m
CBAF
-
7/26/2019 Chap_02-p1_2.pdf
29/33
CAP223Chapter 2 - Part 1 29
Standard Sum-of-Products (SOP) form:equations are written as an OR of AND terms
Standard Product-of-Sums (POS) form:
equations are written as an AND of OR terms
Examples:
SOP:
POS:
These mixed forms are neither SOP nor POS
Standard Forms
BCBACBA
C)CB(AB)(A
C)(AC)B(A
B)(ACACBA
-
7/26/2019 Chap_02-p1_2.pdf
30/33
CAP223Chapter 2 - Part 1 30
Standard Sum-of-Products (SOP)
A sum of minterms form for nvariables canbe written down directly from a truth table.
Implementation of this form is a two-level network
of gates such that:
1. The first level consists of n-input AND gates, and2. The second level is a single OR gate (with fewer than 2n
inputs).
This form often can be simplified so that the
corresponding circuit is simpler.
-
7/26/2019 Chap_02-p1_2.pdf
31/33
CAP223Chapter 2 - Part 1 31
A Simplification Example:
Writing the minterm expression (SOM):
F = A B C + A B C + A B C + ABC + ABC
Simplifying to (SOP):
F = B C + A
Simplified F contains 3 literals compared to 15 inminterm F
What is the difference between SOM and SOP?
Standard Sum-of-Products (SOP)
)7,6,5,4,1(m)C,B,A(F
AND/OR Two level Implementation
-
7/26/2019 Chap_02-p1_2.pdf
32/33
CAP223Chapter 2 - Part 1 32
AND/OR Two-level Implementation
of SOP Expression
The two implementations for F are shownbelowit is quite apparent which is simpler!
F
A
B
C
AB
C
A
B
C
AB
C
B
C
F
B
C
A
-
7/26/2019 Chap_02-p1_2.pdf
33/33
SOP and POS Observations
The previous examples show that: Canonical Forms (Sum-of-minterms), or
other standard forms (SOP, POS) differ in
complexity
Boolean algebra can be used to manipulate
equations into simpler forms.
Simpler equations lead to simpler two-level
implementations