Operator Definitions 

Operations are defined on the values "0" and "1" for each operator: 

AND 
OR 

0 
· 0 = 0 
0 
+ 0 = 0 
NOT 
0 1 
· 1 = 0 · 0 = 0 
0 1 
+ 1 = 1 + 0 = 1 
0 1 = 
1 0 = 

1 
· 1 = 1 
1 
+ 1 = 1 

Dr. I. Damaj 
7 
Truth Tables
Truth table  a tabular listing of the values of a function for all possible combinations of values on its arguments.
Logic Gate Symbols and Behavior 

n 
Logic gates have special symbols: 

X 

X 

Z 5
X


Z 5 
X · Y 
Z 5 
X 1 
Y 
X 

Y 
Y 

AND gate 
OR gate 
NOT gate or inverter 

n 
And waveform behavior: 
(a) 
Graphic symbols 

X 
0 
0 
1 
1 

Y 
0 
1 
0 
1 

(AND) 
X · Y 
0 
0 
0 
1 

(OR) 
X 1 Y 
0 
1 
1 
1 

Dr. I. Damaj 
(NOT) 
X 
1 
1 
0 
0 
11 

(b) 
Timing diagram 
Truth Table 

X Y Z 
F 
= 
X 
+ 
Y’ 
. 
Z 

0 
0 0 
0 

0 
0 1 
1 

0 
1 0 
0 

0 
1 1 
0 

1 
0 0 
1 

1 
0 1 
1 

1 
1 0 
1 

1 
1 1 
1 
Equation
X
Y
Z
n
n
_{F} =X +YZ
F
Logic Diagrams and Expressions
Logic Diagram
Dr. I. Damaj
Boolean equations, truth tables and logic diagrams describe thesame function!
12
Truth tables are unique; expressions and logic diagrams are not. This gives flexibility in implementing functions.
Boolean Algebra 

An algebraic structure defined on a set of at least two elements, B, 

together with three binary operators (denoted +, · and ~ satisfies the following basic identities: 
) that 

1. 
X 
+ 0 = X 
2. 
X 
^{.} 1 = 
X 

3. 
X 
+ 1 = 1 
4. 
X 
^{.} 0 = 0 

5. 
X 
+ X = X 
6. 
X 
^{.} 
X = X 

7. 
X 
+ X 
= 1 
8. 
X 
^{.} 
X = 0 

9. 
X 
= X 

10. 
X + Y = Y + X 
11. 
XY _{=} YX 
Commutative 

12. 
(X + Y) _{+} Z _{=} 
X + (Y _{+} Z) 
13. 
(XY) Z _{=} X(Y Z) 
Associative 

14. 
X(Y + Z) = XY + XZ 
15. 
X 
+ YZ = 
(X + Y) (X + Z) 
Distributive 

16. 
X + Y 
= X 
. 
Y 
17. 
X 
. Y = X + Y 
DeMorgan’s 

Dr. I. Damaj 
13 
Some Properties of Identities & the Algebra 

n The identities above are organized into pairs. These pairs have names as follows: 

n 
14 Existence of 0 and 1 

n 
56 Idempotence 

n 
78 Existence of complement 

n 
9 Involution 

n 
1011 Commutative Laws 

n 
1213 Associative Laws 

n 
1415 Distributive Laws 

n 
1617 DeMorgan ’s Laws 

n The dual of an algebraic expression is obtained by interchanging + and · and interchanging 0’s and 1’s. 

n 
Example: 
F = (A + C) · B + 0 

dual F = 
(A · C + B) · 1 = A · C 
+ B 

Dr. I. Damaj 
14 
Example 1: Boolean Algebraic Proof 

n 
A + A ·B = A 
(Absorption Theorem) 

Proof Steps 
Justification (identity or theorem) 

A + A·B 

= 
A · 1 + A · B X 
= X · 1 

= 
A · ( 1 + B) X 
· Y + X · Z = X ·(Y + Z)(Distributive Law) 

= 
A · 1 
1 + X = 1 

= 
A 
X 
· 1 = X 

n 
Our primary reason for doing proofs is to learn: 

n 
Careful and efficient use of the identities and theorems of Boolean algebra, and 

n 
How to choose the appropriate identity or theorem to apply to make forward progress, irrespective of the application. 

Dr. I. Damaj 
16 
Example 2: Boolean Algebraic Proofs 

AB + AC + BC = AB + AC (Consensus Theorem) 

Proof: 

AB + AC + BC 

= AB + AC + 1 · BC 

= AB +AC + (A + A) · BC 

= AB +AC + ABC + ABC 

= AB(1 + C) +AC (1 + B) 

= AB + AC 

The dual of the consensus theorem 

AB + AC + BC = (A + B)(A+C)(B+C) 

AB + AC = (A + B)(A+C) 

Dr. I. Damaj 
17 
Boolean Function Evaluation
Overview – Canonical Forms 

n 
What are Canonical Forms? 

n 
Minterms and Maxterms 

n 
Index Representation of Minterms and Maxterms 

n 
SumofMinterm (SOM) Representations 

n 
ProductofMaxterm (POM) Representations 

n 
Representation of Complements of Functions 

n 
Conversions between Representations 

Dr. I. Damaj 
21 
Canonical Forms 

n It is useful to specify Boolean functions in a form that: 

n 
Allows comparison for equality. 

n 
Has a correspondence to the truth tables 

n 
Canonical Forms in common usage: 

n 
Sum of Minterms (SOM) 

n 
Product of Maxterms (POM) 

Dr. I. Damaj 
22 
Minterms 

n Minterms are AND terms with every variable present in either true or complemented form. 

n Given that each binary variable may appear normal (e.g., x) or complemented (e.g., x’), there are 2 ^{n} minterms for n variables. 

n Example: Two 
variables 
(X 
and 
Y) 
produce 

2 x 2 = 4 combinations: 

n 
XY 
(both normal) 

n 
XY’ 
(X normal, Y complemented) 

X’Y 
(X complemented, Y normal) 

n 

n 
X’Y’ 
(both complemented) 

n Thus there are four minterms of two variables. 

Dr. I. Damaj 
23 
Maxterms 

n Maxterms are OR terms with every variable in true or complemented form. 

n Given that each binary variable may appear normal (e.g., x) or complemented (e.g., x), there are 2 ^{n} maxterms for n variables. 

n Example: Two 
variables 
(X 
and 
Y) 
produce 

2 x 2 = 4 combinations: 

n 
X + Y 
(both normal) 

n 
X + Y’ 
(X normal, Y complemented) 

n 
X’+ Y 
(X complemented, Y normal) 

n 
X’+ Y’ 
(both complemented) 

Dr. I. Damaj 
24 
Maxterms and Minterms
variables
complemented.
in
the
Dr. I. Damaj
terms
are
true
and
n The index above is important for describing which
which
are
25
Purpose of the Index 

n The index for the minterm or maxterm, expressed as a binary number, is used to determine whether the variable is shown in the true form or complemented form. 

n For Minterms: 

n 
“1” means the variable is “Not Complemented” and 

n 
“0” means the variable is “Complemented”. 

n For Maxterms: 

n 
“0” means the variable is “Not Complemented” and 

n 
“1” means the variable is “Complemented”. 

Dr. I. Damaj 
26 
Index Examples – Four Variables 

Index Binary Minterm Maxterm 

i 
Pattern 
m _{i} 

M _{i} 

0 
0000 
abcd 
a+ b + c +d 

1 
0001 
abcd 
? 

3 
0011 
? 
a 
+ 
b 
+ 
c 
+ 
d 

5 
0101 
abcd 
a 
+ 
b 
+ 
c 
+ 
d 

7 
0111 
? 
a 
+ 
b 
+ 
c 
+ 
d 

10 
1010 
abcd 
a 
+ 
b 
+ 
c 
+ 
d 

13 
1101 
ab 
c 
d 
? 

15 
1111 
abcd 
a 
+ 
b 
+ 
c 
+ 
d 

Dr. I. Damaj 
29 
Minterm and Maxterm Relationship 

n 
Twovariable example: 

M 
_{2} = 
x 
+ 
y 
and 
m 
2 ^{=} x·y 

Thus M _{2} is the complement of m _{2} and viceversa. 

n 
giving: 

M 
i 
= 
m 
i 
and m 
i 
= 
M 
i 

Thus M _{i} is the complement of m _{i} . 

Dr. I. Damaj 
30 
Minterm Function Example
Dr. I. Damaj 

31 

Maxterm Function Example 

n Example: Implement F1 in maxterms: 

F _{1} = 
M _{0} 
· M _{2} 
· 
M _{3} 
· 
M _{5} 
· 
M _{6} 

F 
1 = (x 
+ 
y 
+ 
z) ·(x 
+ 
y 
+ 
z)·(x 
+ 
y 
+ 
z) 

·(x + 
y + 
z)·(x 
+ 
y 
+ 
z) 

x y z 
i 

M _{0} × M _{2} × M _{3} × M _{5} × M _{6} = F1 

0 0 0 
0 
1 0 × 1 × 
× 1 
× _{1} 
= 0 

0 0 1 
1 
1 1 × 
× 1 
× 1 
× _{1} 
= 1 

0 1 0 
2 
1 0 × 
× 1 
× 1 
× _{1} 
= 0 

0 1 1 
3 
1 1 × 
× 0 
× 1 
× 1 
= 0 

1 0 0 
4 
1 1 × 
× 1 
× 1 
× 1 
= 1 

1 0 1 
5 
1 1 × 
× 1 
× 0 
× _{1} 
= 0 

Dr. I. Damaj 
1 1 0 
6 
1 1 × 
× 1 
× 1 
× _{0} 
= 0 
32 

1 1 1 
7 
1 × 1 
× 1 
× 1 
× _{1} 
= 1 
Reading Assignment Circuit Optimization 

n 
Goal: To obtain the simplest implementation for a given function. 

n 
Optimization is a more formal approach to simplification that is performed using a specific procedure or algorithm 

n 
Optimization requires a cost criterion to measure the simplicity of a circuit 

n 
Two distinct cost criteria we will use: 

n 
Literal cost (L) 

n 
Gate input cost (G) 

n 
Gate input cost with NOTs (GN) 

Dr. I. Damaj 
36 
Literal Cost Reading Assignment 

n 
Literal – a variable or its complement. 

n 
Literal cost – the number of literal appearances in a Boolean expression corresponding to the logic circuit diagram. 

n 
Examples: 

n 
F = BD + AB’C + AC’D’ 

n 
L = 8 

Dr. I. Damaj 
37 
Gate Input Cost 
Reading Assignment 

n 
Gate input costs  the number of inputs to the gates in the implementation corresponding exactly to the given 

equation or equations. 
(G  inverters not counted, GN 
 

inverters counted) 

n 
For SOP and POS equations, it can be found from the equation(s) by finding the sum of: 

n all literal appearances 

n the number of terms excluding terms consisting only of a single literal,(G) and 

n optionally, 
the number 
of 
distinct 
complemented 

single literals (GN). 

Dr. I. Damaj 
38 
Boolean Function Optimization 

n Minimizing the gate input (or literal) cost of a (a set of) Boolean equation(s) reduces circuit cost. 

n We choose gate input cost. 

n Boolean Algebra and graphical techniques are tools to minimize cost criteria values. 

n Some important questions: 

n 
When do we stop trying to reduce the cost? 

n 
Do we know when we have a minimum cost? 

n Treat optimum or nearoptimum cost functions for twolevel (SOP and POS) circuits first. 

n Introduce a graphical technique using Karnaugh maps (Kmaps, for short) 

Dr. I. Damaj 
41 

Karnaugh Maps (Kmap) 

n A Kmap is a collection of squares 

n 
Each square represents a minterm 

n 
The collection of squares is a graphical representation of 

a 
Boolean function 

n 
Adjacent squares differ in the value of one variable 

n 
Alternative algebraic expressions for the same function are derived by recognizing patterns of squares 

n The Kmap can be viewed as 

n 
A reorganized version of the truth table 

n 
A topologicallywarped Venn diagram as used to visualize 

sets in algebra of sets 

Dr. I. Damaj 
42 
Some Uses of KMaps 

n Provide a means for: 

n Finding optimum or near optimum 

n 
SOP and POS standard forms, and 

n 
twolevel AND/OR and OR/AND circuit implementations 

n 
for functions with small numbers of variables 

n Visualizing concepts 
related 
to 
manipulating 
Boolean 

expressions, and 

n Demonstrating concepts used by computeraided design programs to simplify large circuits 

Dr. I. Damaj 
43 
Two Variable Maps
x y
44
x y
variable as well.
n Finally,
m2
and m3 differ
in
value of the variable y.
Dr. I. Damaj
the
y
^{m}
^{m}
KMap and Truth Tables
KMap Function Representation 

n Example: F(x,y) = x 
F 
= x 
y = 0 
y = 1 

x 
= 0 
0 
0 

x = 1 
1 
1 

n For function F(x,y), the two adjacent cells containing 1’s can be combined using the Minimization Theorem: 

F(x, y) 
= 
x y 
+ 
xy 
= 
x 

Dr. I. Damaj 
46 
KMap Function Representation
n 
Example: G(x,y) = x + y 
G = x+y 

x 
= 0 

x 
= 1 

n 
0
1
y = 1
1
1
+
y
47
y = 0
For G(x,y), two pairs of adjacent cells containing 1’s can be combined using the Minimization Theorem:
(
)
(
)
Duplicate xy
KMap Function Representation
Dr. I. Damaj
48
Three Variable Maps
Alternative Map Labeling
Example Functions
Combining Squares 

n By combining squares, we reduce number of literals in a product term, reducing the literal cost, thereby reducing the other two cost criteria. 

n 
On a 3variable KMap: 

n 
One square represents a minterm with three variables 

n 
Two adjacent squares represent a product term with two variables 

n 
Four “adjacent” terms represent a product term with one variable 

n 
Eight “adjacent” terms is the function of all ones (no variables) = 1. 

Dr. I. Damaj 
52 
ThreeVariable Maps 

n Reduced literal product terms for SOP standard forms correspond to rectangles on Kmaps containing cell counts that are powers of 2. 

n Rectangles of 2 cells represent 2 adjacent minterms; of 4 cells represent 4 minterms that form a “pairwise adjacent” ring. 

n Rectangles 
can 
contain 
nonadjacent 
cells 
as 

illustrated by the “pairwise adjacent” ring above. 

Dr. I. Damaj 
54 
ThreeVariable Map Simplification
n Use a Kmap to find an optimum SOP equation for
F(X, Y, Z) = S m(0,1,2,4,6,7)
Dr. I. Damaj
61
Four Variable Maps
FourVariable Map Simplification
n F(W, X, Y, Z) = S m(0, 2,4,5,6,7,8,10,13,15)
Dr. I. Damaj
68
FourVariable Map Simplification
)
n F(W, X, Y, Z) = S m(3,4,5,7,9,1
3,14,15
Dr. I. Damaj
69
Don't Cares in KMaps 

n 
Sometimes a function table or map contains entries for which it known: 
is 

n 
the input values for the minterm will never occur, or 

n 
The output value for the minterm is not used. 

n 
In these cases, the output value need not be defined 

n 
Instead, the output value is defined as a “don't care” 

n 
By placing “don't cares ” ( an “x” entry) in the function table or map, the cost of the logic circuit may be lowered. 

n 
Example 1: A logic function having the binary codes for the BCD digits as its inputs. Only the codes for 0 through 9 are used. The six codes, 1010 through 1111 never occur, so the output values for these codes are “x” to represent “don’t cares.” 

Dr. I. Damaj 
70 
MultipleLevel Optimization
Multiplelevel optimization is performed by applying transformations to circuits represented by equations while evaluating cost
Dr. I. Damaj
72
Transformations Reading Assignment 

n Factoring  finding a factored form from SOP or POS expression 

n 
Algebraic  No use of axioms specific to Boolean algebra such as complements or idempotence 

n 
Boolean  Uses axioms unique to Boolean algebra 

n Decomposition  expression of a function as a set of new functions 

Dr. I. Damaj 
73 
Reading Assignment 

Transformations (continued) 

n 
Substitution of G into F  expression function F as a function of G and some or all of its original variables 

n 
Elimination  Inverse of substitution 

n 
Extraction  decomposition applied to multiple functions simultaneously 

Dr. I. Damaj 
74 
Reading Assignment Transformation Examples 

n Algebraic Factoring 

F = A’C’D’ + A’BC’ + ABC + ACD’ 
 
G = 16 

n 
Factoring: 

n 
F = A’(C’D’ + BC’) + A (BC + CD’) 
 
G = 16 

n 
Factoring again: 

n 
F = A’C’(B + D’) + AC (B + D’) 
 
G = 12 

n 
Factoring again: 

F = (A’C’ + AC) (B + D’) 
 G = 10 

Dr. I. Damaj 
75 
Reading Assignment Transformation Examples 

n Decomposition 

n The 
terms 
B 
+ 
D’ 
and A’C’+ AC can be 

defined as new functions E and H respectively, decomposing F: 

F = E H, E = B + D’, and H = A’C’ + AC 
G = 10 

n This series of transformations has reduced G from 16 to 10, a substantial savings. The resulting circuit has three levels plus input inverters. 

Dr. I. Damaj 
76 
Reading Assignment Transformation Examples 

n Elimination 

n Beginning with a new set of functions: 

n 
X = B + C 

n 
Y = A + B 

n 
Z = A ’X + C Y 
G = 10 

n Eliminating X and Y from Z: 

n 
Z = A’(B + C) + C (A + B) 
G = 10 

n “Flattening” (Converting to SOP expression): 

n 
Z = A ’B + A’C + AC + BC 
G = 12 

n This has increased the cost, but has provided a new SOP expression for twolevel optimization. 

Dr. I. Damaj 
78 
Reading Assignment Transformation Examples 

n Twolevel Optimization 

n The result of 2level optimization is: 

Z = A’B + 
C 
G = 4 

n This example illustrates that: 

n Optimization can begin with any set of equations, not just with minterms or a truth table 

n Increasing gate input count G temporarily during a series of transformations can result in a final solution with a smaller G 

Dr. I. Damaj 
79 
Reading Assignment Transformation Examples 

n Extraction 

n Beginning with two functions: 

E 
= A’B’D’ + A’BD 

H 
= B’CD’ + BCD 
G = 16 

n Finding a common factor and defining it as a function: 

F 
= B’D’ + BD 

n We perform extraction by expressing E and H as the three functions: 

F 
= B’D’ + BD, E = A’F, H = CF 
G = 10 

n The reduced cost G results from the sharing of logic between the two output functions 

Dr. I. Damaj 
80 
Other Gate Types 

n 
Why? 

n 
Implementation feasibility and low cost 

n 
Power in implementing Boolean functions 

n 
Convenient conceptual representation 

n Gate classifications 

n 
Primitive gate  a gate that can be described using a single primitive operation type (AND or OR) plus an optional inversion(s). 

n 
Complex gate  a gate that requires more than one primitive operation type for its description 

n Primitive gates will be covered first 

Dr. I. Damaj 
81 
Reading Assignment Odd and Even Functions 

n 
The odd 
and 
even 
functions 
on 
a 
Kmap 
form 

“checkerboard” patterns. 

n 
The 1s of an odd function correspond to minterms having an index with an odd number of 1s. 

n 
The 1s of an even function correspond to minterms having an index with an even number of 1s. 

n 
Implementation of odd and even functions for greater 

than 4 variables as a twolevel circuit is difficult, so we use “trees” made up of : 

n 
2input XOR or XNORs 

n 
3 or 4input odd or even functions 

Dr. I. Damaj 
91 
Reading Assignment
Odd and Even Functions
Dr. I. Damaj
93
Reading Assignment Parity Generators and Checkers 

n In Chapter 1, a parity bit added to nbit code to produce an n + 1 bit code: 

n 
Add odd parity bit to generate code words with even parity 

n 
Add even parity bit to generate code words with odd parity 

n 
Use odd parity circuit to check code words with even parity 

n 
Use even parity circuit to check code words with odd parity 

n 

Example: n = 3. Generate even parity code words of length 4 with odd parity generator: n Check even parity code words of length 4 with odd parity checker: X Y Z 

^{P} 

n X 

Operation: (X,Y,Z) = (0,0,1) gives (X,Y,Z,P) = (0,0,1,1) and E = 0. If Y changes from 0 to 1 between generator and checker, then E = 1 indicates an error. Y E 

Z P 

Dr. I. Damaj 
94 
HiImpedance Outputs 

n Logic gates introduced thus far 

n 
have 1 and 0 output values, 

n 
cannot have their outputs connected together, and 

n 
transmit signals on connections in only one direction. 

n Threestate logic adds a third logic value, HiImpedance (HiZ), giving three states: 0, 1, and HiZ on the outputs. 

n What is a HiZ value? 

n 
The HiZ value behaves as an open circuit 

n 
This means that, looking back into the circuit, the output appears to be disconnected. 

n 
It is as if a switch between the internal circuitry and the output has been opened. 

Dr. I. Damaj 
95 
The 3State Buffer
Problems 

n No. 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.10, 2.12, 2.14, 2.15, 2.16, 2.17, 2.18, 2.19, 2.20, 2.21, 2.22, 2.23, 2.24, 2.27, 2.31, 2.32, 2.34. 

Dr. I. Damaj 
99 
Much more than documents.
Discover everything Scribd has to offer, including books and audiobooks from major publishers.
Cancel anytime.