0% found this document useful (0 votes)
11 views

03 - Simplification of Boolean Functions

Uploaded by

kamhadido
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

03 - Simplification of Boolean Functions

Uploaded by

kamhadido
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 113

Digital Logic

0907231

Adapted from Dr. Bassam Kahhaleh’ Slides by Prof. Iyad Jafar


Chapter 3
Simplification of
Boolean Functions
Outline
★ Introduction
★ Cost of Boolean Functions
★ Structure of Karnaugh Maps (K-Maps)
★ Simplification Using the Map
★ Don’t Care Conditions
★ Other types of gates (Revisited)
● Buffers and Three-State Buffers (Chapter 12)
● Universal Gates (Chapter 4)
● XOR and XNOR Functions (Chapter 4)

2
Introduction
Introduction
★ Cost of digital circuit is directly proportional to the
complexity of logic function or expression
★ Smallest/optimal expressions are desirable!
★ Goal:
● Obtain the simplest implementation for a given function
● Optimization!

★ How to calculate the cost of a function?

★ How to simplify/optimize a function?

4
Cost of Boolean
Functions
How to Calculate the Cost?
★ Literal Cost (L)
● A literal is a variable or its complement (A, A’, B, B’)
● Literal cost is simply the number of all variable
appearances

★ Example
● F = BD + AB’C + AC’D’ L=8
● F = BD + AB’C + A’B’D + AB’C L = 11
● F = (A + B’)(A + D)(B + C’ + D)( B + C + D) L = 10

6
How to Calculate the Cost?
★ Gate Input Cost (G)
● It is the number of literals plus the number of terms
excluding single variable terms
★ Gate Input Cost with Invertors (GN)
● It is G plus the number of distinct complemented literals
★ Example
● F = BD + AB’C + AC’D’ G = 11, GN = 14

● F = BD + AB’C + ABD’ + ABC’ G = 15, GN = 18

● F = (A + B’ )(A + D’)(B’ +C’ + D’)( A +C+ D) G = 14 , GN =17

7
How to Calculate the Cost?
★ Example

8
How to Calculate the Cost?
★ Example. Two circuits for the same function F.
A A
B B
C C
F F

F = ABC + A’B’C’ F = (A+C’)(B’+C)(A’+B)


L = 6, G = 8, GN = 11 L = 6, G = 9, GN = 12
★ Same literal cost! Select the one with less G/GN.

9
Simplifying Boolean
Functions
How to Optimize/Simplify a Boolean Function?

★ Boolean algebra
● Not systematic, can’t guarantee optimality

★ Karnaugh Maps (k-Maps)


● Graphical, up to functions of six variables

★ Computer-based logic tools


● Can minimize a large set of Boolean equations
efficiently and quickly

11
Structure of K-Maps
Karnaugh Map
★ K-Map is a pictorial form of the truth table
★ It consists of adjacent squares; one square for each
possible minterm in the function
● Number of squares = number of combinations
♦ 2 Variables ⇨ 4 squares
♦ 3 Variables ⇨ 8 squares
♦ 4 Variables ⇨ 16 squares
♦…
★ The minterms are assigned to the squares such that
● Adjacent squares have minterms that differ in the state
one variable
13
Two-variable Map

y y
x y Minterm y
x 0 1
0 0 0 m0
1 0 1 m1 x 0 m0 m1

2 1 0 m2 x 1 m2 m3
3 1 1 m3
y y
Note: minterms in
adjacent squares differ
y
y x 0 1
in one variable!

m0 m1 x 0

x m2 m3 x 1
14
Example 1
★ F(x,y)= ∑ (0,1) y y
y
x y F Minterm x 0 1
0 0 0 1 m0 x 0 m0 m1
1 0 1 1 m1
x 1 m2 m3
2 1 0 0 m2
3 1 1 0 m3
y y
y
F(x,y) = x’y’ + x’y x
F(x,y) = x’ (y’ + y) x 1 1
F(x,y) = x’ x 0 0

15
Example 2
★ F(x,y)= ∑ (1,3) y y
y
x y F Minterm x 0 1
0 0 0 0 m0 x 0 m0 m1
1 0 1 1 m1
x 1 m2 m3
2 1 0 0 m2
3 1 1 1 m3
y y
y
F(x,y) = x’y + xy x
F(x,y) = y (x’ + x) x 0 1
F(x,y) = y x 0 1

16
Example 3
★ F(x,y)= ∑ (1,2,3) y y
y
x y F Minterm x 0 1
0 0 0 0 m0 x 0 m0 m1
1 0 1 1 m1
x 1 m2 m3
2 1 0 1 m2
3 1 1 1 m3
y y
y
F(x,y) = x’y + xy’+ xy x
F(x,y) = x’y + xy’+ xy + xy x 0 1
F(x,y) = y (x’+x) + x (y’+ y)
x 1 1
F(x,y) = y + x
17
Example 4
★ F(x,y)= ∑ (1,2) y y
y
x y F Minterm x 0 1
0 0 0 0 m0 x 0 m0 m1
1 0 1 1 m1
x 1 m2 m3
2 1 0 1 m2
3 1 1 0 m3
y y
y
F(x,y) = x’y + xy’ x
x 0 1
F(x,y) = x’y + xy’ ??
x 1 0

18
Three-variable Map

x y z Minterm
0 0 0 0 m0 y y
yz
1 0 0 1 m1
x 00 01 11 10
2 0 1 0 m2
x 0 m0 m1 m3 m2
3 0 1 1 m3
4 1 0 0 m4 x 1 m4 m5 m7 m6
5 1 0 1 m5
6 1 1 0 m6 z z z
7 1 1 1 m7

19
Three-variable Map
yz y y

x y z Minterm x

0 0 0 0 m0 x

1 0 0 1 m1 x
2 0 1 0 m2
3 0 1 1 m3 z z z
4 1 0 0 m4
5 1 0 1 m5
y
6 1 1 0 m6
m0 m1 m3 m2
7 1 1 1 m7
x m4 m5 m7 m6
z 20
Example 5
y
m0 m1 m3 m2
x y z F
x m4 m5 m7 m6
0 0 0 0 0
z
1 0 0 1 0
y
2 0 1 0 1
0 0 1 1
3 0 1 1 1
x 1 1 0 0
4 1 0 0 1
z
5 1 0 1 1
F(x,y,z) = x’yz’ + x’yz + xy’z’+ xy’z
6 1 1 0 0
F(x,y,z) = x’y (z +z’) + xy’ (z’+z)
7 1 1 1 0
F(x,y,z) = x’y + xy’
21
Groups of Two
y y
1 1 1
x 1 x
z z
F = y’z’ F = x’y

y y
1 1
x x 1 1
z z

F = x’z’ F = x z’
22
Example 6
y
x y z F 0 1 1 0
0 0 0 0 0 x 0 1 1 0
1 0 0 1 1 z
2 0 1 0 0
3 0 1 1 1
4 1 0 0 0
5 1 0 1 1 y
6 1 1 0 0
0 1 1 0
7 1 1 1 1
x 0 1 1 0
z 23
Groups of Four
y y
1 1 1 1 1 1
x 1 1 x
z z
F = z’ F = x’

y y
1 1 1 1
x 1 1 x 1 1
z z
F=z F=y
24
Example 7

m0 m1 m3 m2
x y z F m4 m5 m7 m6
0 0 0 0 1 yz
1 0 0 1 0 x 00 01 11 10
0
2 0 1 0 1
3 0 1 1 0 1
4 1 0 0 1 y
5 1 0 1 1 1 0 0 1
6 1 1 0 1
x 1 1 0 1
7 1 1 1 0 z

25
Example 8
m0 m1 m3 m2
x y z F m4 m5 m7 m6
0 0 0 0 0 yz
x 00 01 11 10
1 0 0 1 0
0
2 0 1 0 0
3 0 1 1 1 1

4 1 0 0 1 y
5 1 0 1 0 0 0 1 0
6 1 1 0 1 x 1 0 1 1
7 1 1 1 1 z Extra

26
Example 9. Fill the K-Map
★ F1(A,B,C) = ∑m(1,2,3,7)

★ F3 (A,B,C) = ∏M(0,1,2,6)

27
Four-variable Map

w x y z Minterm
0 0 0 0 0 m0 y y
1 0 0 0 1 m1 yz
2 0 0 1 0 m2 wx 00 01 11 10
3 0 0 1 1 m3
4 0 1 0 0 m4 00 m0 m1 m3 m2 x
5 0 1 0 1 m5 w
6 0 1 1 0 m6 01 m4 m5 m7 m6
7 0 1 1 1 m7 x
8 1 0 0 0 m8 11 m12 m13 m15 m14
9 1 0 0 1 m9 w
10 1 0 1 0 m10 10 m8 m9 m11 m10 x
11 1 0 1 1 m11
12 1 1 0 0 m12
13 1 1 0 1 m13
m14
z z z
14 1 1 1 0
15 1 1 1 1 m15

28
Four-variable Map

w x y z Minterm
0 0 0 0 0 m0
m1
y y
1 0 0 0 1
2 0 0 1 0 m2 yz
3 0 0 1 1 m3 wx 00 01 11 10
4 0 1 0 0 m4
00 x
5 0 1 0 1 m5
6 0 1 1 0 m6 w
7 0 1 1 1 m7 01
8 1 0 0 0 m8 x
9 1 0 0 1 m9 11
10 1 0 1 0 m10 w
11 1 0 1 1 m11 10 x
12 1 1 0 0 m12
13 1 1 0 1 m13
14 1 1 1 0 m14 z z
z
15 1 1 1 1 m15

29
Four-variable Map

w x y z Minterm
0 0 0 0 0 m0
1 0 0 0 1 m1
2 0 0 1 0 m2 y
3 0 0 1 1 m3
4 0 1 0 0 m4 m0 m1 m3 m2
5 0 1 0 1 m5
6 0 1 1 0 m6 m4 m5 m7 m6
7 0 1 1 1 m7 x
8 1 0 0 0 m8 m12 m13 m15 m14
9 1 0 0 1 m9 w
10 1 0 1 0 m10 m8 m9 m11 m10
11 1 0 1 1 m11
12 1 1 0 0 m12 z
13 1 1 0 1 m13
14 1 1 1 0 m14
15 1 1 1 1 m15

30
Example 10
★ G(w,x,y,z) = ∑(1,3,5,7,8,10,12,14)
y y
m0 m1 m3 m2 1 1
m4 m5 m7 m6 1 1
x x
m12 m13 m15 m14 1 1
w w
m8 m9 m11 m10 1 1
z z
F = w’x’y’z+w’x’yz+w’xy’z+w’xyz+wx’y’z’+wx’yz’+wxy’z’+wxyz’
F = w’x’y’z+w’x’yz+w’xy’z+w’xyz+wx’y’z’+wx’yz’+wxy’z’+wxyz’
F = w’x’z + w’xz + wy’z’+ wyz’
F = w’z + wz’
31
Example 11
y
m0 m1 m3 m2
w x y z F Minterm
0 0 0 0 0 1 m0 m4 m5 m7 m6
1 0 0 0 1 1 m1 x
2 0 0 1 0 1 m2 m12 m13 m15 m14
3 0 0 1 1 0 m3 w
4 0 1 0 0 1 m4 m8 m9 m11 m10
5 0 1 0 1 1 m5
z
6 0 1 1 0 1 m6 y
7 0 1 1 1 0 m7
8 1 0 0 0 1 m8
1 1 0 1
9 1 0 0 1 1 m9 1 1 0 1
10 1 0 1 0 0 m10 x
1 1 0 1
11 1 0 1 1 0 m11 w
12 1 1 0 0 1 m12 1 1 0 0
13 1 1 0 1 1 m13 z
14 1 1 1 0 1 m14
15 1 1 1 1 0 m15

32
Groups of Four
y y
1
1 1 1 1 1
x x
1 1 1 1 1
w w
1
z z
F= y’z’ + xy F = xz’
y
1 1
1 1
x F = x’z’ + xz
1 1
w
1 1
z
33
Groups of Eight
y
1 1
1 1
x
1 1
w
1 1
z
F = y’
y
1 1 1 1

x
w
1 1 1 1
z
F = x’ 34
Example 12 Fill the K-Map
★ F1(A,B,C,D)=∑(9,13)

35
Example 13 Fill the K-Map
★ F3 (w,x,y,z) = ∏ (0,2,4,6,9,11,12,13,14,15)

36
Example 14 Fill the K-Map

F(A,B,C,D) = A’ B’ C’ + B’ C D’ + A’ B C D’ + A B’ C’

B
A
D

37
Example 14 Fill the K-Map

F(A,B,C,D) = A’ B’ C’ + B’ C D’ + A’ B C D’ + A B’ C’

C
1 1

B
A
D

38
Example 14 Fill the K-Map

F(A,B,C,D) = A’ B’ C’ + B’ C D’ + A’ B C D’ + A B’ C’

C
1

B
A
1
D

39
Example 14

F(A,B,C,D) = A’ B’ C’ + B’ C D’ + A’ B C D’ + A B’ C’

1
B
A
D

40
Example 14 Fill the K-Map
F(A,B,C,D) = A’ B’ C’ + B’ C D’ + A’ B C D’ + A B’ C’

B
A
1 1
D

41
Example 14 Fill the K-Map

F(A,B,C,D) = A’ B’ C’ + B’ C D’ + A’ B C D’ + A B’ C’

C
1 1 1
1
B
A
1 1 1
D

42
K-map Summary
★ K-map arranges the minterms graphically in such
a way that is easy to combine them and use the
adjacency property

★ Neighbor/adjacent minterms differ in only one


variable only

★ Neighbor/Adjacent minterms are in


● Top and bottom rows
● Left and right columns

43
Simplification Using the
Map
Simplification Using the Map
★ The goal is to use the map to simplify logic
functions
★ Simplest expression
● Should be valid!
● Minimum number of terms
● Smallest terms
★ On the map
● Include all the 1s (or all the 0s ☺)
● Minimum number of rectangles
● Largest rectangles
45
Implicants
★ Implicant is a rectangle or square with size 1, 2, 4,
8, . . . (power of 2) of 1’s
Implicant of
size 4: BD
Implicant of C
size 1: 1
A’BC’D’
1 1 1
B
1 1 1
A
Implicant of 1
size 2:
AC’D D

46
Prime Implicants
★ Prime Implicant (PI) is an implicant that is as
large as possible

Prime Implicant:
Can’t grow C
beyond this size
1
1 1 1
B
1 1 1
A
1
D

47
Essential Prime Implicants
★ An essential prime implicant (EPI) is a prime
implicant that includes at least one ‘1’ that is not
included in any other prime implicant.

Essential Prime Not essential


Implicant: C
No other choice
1
1 1 1
B 8 Implicants
1 1 1 5 PIs
A
1 4 EPIs
D
48
Example 15
★ Find the PIs and EPIs for
F(A,B,C,D) = ∑ (4,5,10,11,12,13,14,15)
C
PI EPI?

1 1 BC’ Yes
B
1 1 1 1 AC Yes
A
1 1 AB No

D
Extra

F(A,B,C,D) = BC’ + AC + AB
49
Example 16
★ Find the PIs and EPIs for
F(A,B,C,D) = ∑ (4,5,6,7,8,11,12,15)
C
PI EPI?

A’B Yes
1 1 1 1
B AC’D’ Yes
1 1 ACD Yes
A
1 1 BC’D’ No
D BCD No

F(A,B,C,D) = A’B + AC’D’ + ACD


50
SOP Minimization
★ To minimize a function into SOP:
1. Draw and fill the k-map
2. Find all Prime Implicants on the map
3. Identify all EPIs and include them in the
expression
4. If there are still uncovered 1’s, then select
enough PIs to cover them.
o Choose a PI that covers as many new 1’s. If there is
tie, pick the simplest PI (i.e. the biggest group)

51
Example 17
★ F(A,B,C) = ∑ (0,1,4,5,6)

B
1 1
A 1 1 1
C

F(A,B,C) = AC’ + B’

52
Example 18
★ F(A,B,C) = ∏ (0,3,4,5,7)

B
0 1 0 1
A 0 0 0 1
C

F(A,B,C) = BC’ + A’B’C

53
Example 19
★ G(W,X,Y,Z) = ∑(0,1,3,7,8,11,13,15)
Y
1 1 1
1
X
1 1
W
1 1
Z
W’X’Y’ GN =
G = YZ + X’Y’Z’ + WXZ +
W’X’Z GN =

54
Simplification as POS
★ To Simplify the function F as Product of Sum
(POS)
1. Simplify F’ as Sum of Product (SOP)
2. Take the complement of F’

55
Example 20
Find the POS of F(x,y,z) = ∑(1,3,6,7)

y y

1 1 1 1

x 1 1 x 1 1
z z
F(x,y,z) F’(x,y,z) = x’z’ + xy’

Complement

F(w,x,y) = (x+z) (x’+y)


56
Example 21
★ Find POS of G(W,X,Y,Z) = ∑(0,1,3,7,8,11,15)
Y Simplify G as SoP and compare
the cost with PoS.
1 1 1 0
0 0 1 0
X
0 0 1 0
W
1 0 1 0
Z

G’ = YZ’ + WY’Z + XY’


G = (Y’+Z) (W’+Y+Z’) (X’+Y)
57
Example 22
y
1 1 0 1
1 1 0 1
x
1 1 0 1
w
1 1 0 0
z
y
1 1 0 1
1 1 0 1
x
1 1 0 1
w
1 1 0 0
z
Calculate GN for both expressions?
58
Example 22 - Continued
y
1 1 1 0 F=
1 1 1 1
x
1 1 1 1
w
1 1 0 0
z
y
1 1 1 0 F’ =
1 1 1 1
x
1 1 1 1
w
1 1 0 0 F=
z

Calculate GN for both expressions? 59


Don’t Care Conditions
Don’t Care Conditions
★ For some functions, it may happen that
● Some input combinations may never happen
● The output for some input combinations is not specified
★ For such cases we DON’T CARE about the output
★ DON’T CARE combinations can be assumed 0 or 1
★ We use ‘X’ to denote a Don’t Care condition in the truth
table or the k-map

Don’t care
conditions are
marked with X

61
Example 23
★ A digital circuit accepts 4 A B C D F(A,B,C,D)
0 0 0 0 0
inputs; A, B, C and D, which
0 0 0 1 0
represent a single BCD digit 0 0 1 0 0
and outputs 1 only when the 0 0 1 1 0
input value is greater than 4 0 1 0 0 0
0 1 0 1 1
0 1 1 0 1
0 1 1 1 1
A 1 0 0 0 1
B Digital System 1 0 0 1 1
F
C 1 0 1 0 X
D 1 0 1 1 X
1 1 0 0 X
1 1 0 1 X
1 1 1 0 X
1 1 1 1 X 62
Example 23 - Continued

SoP PoS
C C

0 0 0 0 0 0 0 0

0 1 1 1 0 1 1 1
B B
X X X X X X X X
A A
1 1 X X 1 1 X X
D D
F’(A,B,C,D) =
F(A,B,C,D) = BC + BD + A

F(A,B,C,D) = 63
Example 24
★ Simplify the following function as SOP
F(A,B,C,D) = ∑ (3,9,11,12,13,14,15) + d(1,4,6)
C
X 1 PI EPI?
X X B’D Yes
B
1 1 1 1 BD’ No
A
1 1 AD No
D AB No

F(A,B,C,D) =
64
Example 25
★ Simplify the following function as POS
F(A,B,C,D) = ∑ (3,9,11,12,13,14,15) + d(1,4,6)
C
PI EPI?
0 X 0
A’B Yes
X 0 0 X
B A’D’ No
A A’C’ No
0 0
B’D’ Yes
D
F’(A,B,C,D) =
F (A,B,C,D) =
65
Example 26
★ Simplify F(w,x,y) = ∏(0,1,3,5,7) + d(4,6) as POS

x
0 0 0 1
w X 0 0 X
y

F’(w,x,y) =

F(w,x,y) =

66
PIs and EPIs with Don’t Care
★ Starts with ones only (not X’s) and include X’s if
needed to make bigger groups

★ Ignore X’s when identifying EPIs

★ To simplify a function, use the same method we


learned.

★ When you are done, some of the X’s may be


included and some may not. But we don’t care
whether they are included in the function or not.

67
Example 27

F (w, x, y, z) = ∑(1, 3, 7, 11, 15)


d (w, x, y, z) = ∑(0, 2, 5)
x=0 x=1 x=0
y y
x 1 1 x x x
x=1
x 1 0 x 0
x x
1 0 0 0
w w
1 0 0 0
z z

68
Other Types of Gates
Other Types of Gates
★ Why?
● Implementation feasibility and low cost
● Power in implementing Boolean functions
● Convenient conceptual representation
★ Gate classifications:
● Primitive (basic) gate: a gate that can be described using a single
primitive operation type (AND or OR) plus an optional
inversion(s).
Primitive gates🡪 AND, NAND, OR, NOR, NOT, BUFFER
● Complex gate: a gate whose function is represented by more than
one primitive gates
Complex gate 🡪 XOR, XNOR

70
Buffers and Three-state
Buffers
Buffers

X F
X F 0 0
1 1

72
High-Impedance Outputs
★ Logic gates introduced thus far 1 1
● have “1” and “0” output values, 1
● cannot have their outputs connected together 0 0
(possible short circuit), and 0
● transmit signals on connections in only one direction.

★ Three-state logic adds a third logic value, Hi-Impedance (Hi-Z),


giving three states: 0, 1, and Hi-Z on the outputs.
★ Hi-Z can be also denoted as Z or z
★ The presence of a Hi-Z state makes a gate output behave quite
differently:
● Have “1”, “0”, and “Hi-Z”
● Can have their outputs connected together, and
● Can transmit signals on connections in two directions.

73
High-Impedance Outputs
★ What is a Hi-Z value?
● The Hi-Z value behaves as an open circuit.
● This means that, looking back into the circuit, the output
appears to be disconnected.
● It is as if a switch between the internal circuitry and the
output has been opened.

★ Hi-Z may appear on the output of any gate, but we


restrict gates to 3-state buffer.

74
Three-State Gates
★ Tri-State Buffer
E IN Y
IN OUT 0 X Hi-Z
1 0 0
E 1 1 1
★ For EN = 1, the output value follows the input value

★ For EN = 0, regardless of the value on IN (denoted by


X), the output value is Hi-Z

75
Application

System
A
System
Expensive!
C
System
B

System
A Sharing!
System
C
System
B Mechanical Switches!

76
Application

System
A

System
C

System
B

Control

77
Three-State Buffer
★ Other versions
EN IN OUT
0 X Hi-Z
Active High Buffer
1 0 1
1 1 0

EN IN OUT
0 0 0
Active Low Buffer
0 1 1
1 X Hi-Z

EN IN OUT
0 0 1 Active Low Buffer
0 1 0
1 X Hi-Z
78
Logic Functions Using Tri-State Buffers
★ AND Gate A B F
0 0 0
F=0
0 1 0
1 0 0
F=B
1 1 1

A F

79
Tri-State Buffers

80
Logic Functions Using Tri-State Buffers
★ Example. What is the logic function implemented
in the following circuit?
X Y Z F
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

81
Logic Functions Using Tri-State Buffers
★ Example. Implement F(X,Y,Z) using four tri-state
buffers.
X Y Z F
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 1

82
Real Stuff
★ 74LS244
★ Octal 3-STATE Buffer/Line Driver/Line Receiver

83
Universal Gates
NAND Gate
★ NOT-AND

X X
Y Y
Z

X Y Z F
X Y F
0 0 0 1
0 0 1
0 0 1 1
0 1 1
0 1 0 1
1 0 1
0 1 1 1
1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
85
NOR Gate
★ NOT-OR

X X
Y
Y
Z

X Y Z F
X Y F 0 0 0 1
0 0 1 0 0 1 0
0 1 0 0 1 0 0
1 0 0 0 1 1 0
1 1 0 1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 0

86
NAND Properties
★ Identities
● X.0=1
● X.1=X
● X.X=X
● X.X=1
★ Commutative & Associative
● X.Y=Y.X

● (X . Y) . Z ≠ X . (Y . Z) ≠ X . Y . Z

87
NOR Properties
★ Identities
● X+1=0
● X+0=X
● X+X=X
● X+X=0
★ Commutative & Associative
● X+Y=Y+X

● (X + Y) + Z ≠ X + (Y + Z) ≠ X + Y + Z

88
Universal Gates
★ One Type
● Use as many as you need (quantity), but one type only.
★ Perform Basic Operations
● AND, OR, and NOT
★ NAND Gate
● NOT-AND functions
● OR function can be obtained from AND by Demorgan’s
★ NOR Gate
● NOT-OR functions (AND by Demorgan’s)

89
Universal Gates
★ NAND Gate
● NOT:

● AND:

● OR:
DeMorgan’s

90
Universal Gates
★ NOR Gate
● NOT:

● OR:

● AND:
DeMorgan’s

91
NAND & NOR Implementation
★ Two-Level Implementation

92
NAND & NOR Implementation
★ Two-Level Implementation

93
NAND & NOR Implementation
★ Multilevel NAND Implementation

94
NAND & NOR Implementation
★ Multilevel NOR Implementation

95
Real Stuff
★ 74LS00
★ Quadruple 2-Input NAND

96
XOR and XNOR
Functions
Exclusive-OR
★ XOR x y XOR
F=x⊕y=xy+xy 0 0 0
0 1 1
1 0 1
1 1 0

★ XNOR
F=x⊕y=x🞊y=xy+xy x y XNOR
0 0 1
0 1 0
1 0 0
1 1 1
98
Exclusive-OR
★ Identities
● x⊕0=x
● x⊕1=x
● x⊕x=0
● x⊕x=1
● x⊕y=x⊕y=x⊕y
★ Commutative & Associative
● x⊕y=y⊕x
● (x⊕y)⊕z=x⊕(y⊕z)=x⊕y⊕z

99
Exclusive-NOR
★ Identities
● x🞊0= x
● x🞊1=x
● x🞊 x=1
● x🞊 x=0
● x🞊 y =x🞊 y=x🞊 y
★ Commutative & Associative
● x🞊 y=y🞊 x
● (x🞊 y)🞊 z=x🞊 (y🞊 z)≠x🞊 y🞊z

100
Exclusive-OR Functions
★ Odd Function x y z XOR
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
F=x⊕y⊕z 1 0 1 0
F= 1 1 0 0
1 1 1 1
= yz
= x 00 01 11 10
0 0 1 0 1
=
1 1 0 1 0
F = ∑(1, 2, 4, 7)
101
Exclusive-NOR Functions
★ Even Function x y z XNOR
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
F=x⊕y⊕z 1 0 1 1
= 1 1 0 1
1 1 1 0
=
yz
F = ∑(0, 3, 5, 6) x 00 01 11 10
0 1 0 1 0
1 0 1 0 1

102
Parity

1 1
0 0
1 0
0 �0

1 1
0 0
1 0
0 �0
1 1
��
Parity Parity
Generator Checker

103
Parity Generator
★ Odd Parity
1 1
0 0
1 1
0 0

1
Odd number of ‘1’s

★ Even Parity
1 1
0 0
1 1
0 0

0
Even number of ‘1’s

104
Parity Checker
★ Odd Parity
1
0
1
0

Error
1 Check
★ Even Parity
1
0
1
0

Error
0 Check

105
Real Stuff
★ 74HC86
★ Quadruple 2-Input XOR

106
Exercises
Suggested Problems (5th Edition)

★ 3-1 ★ 3-9
★ 3-2 ★ 3-10
★ 3-3 ★ 3-15
★ 3-4 ★ 3-16
★ 3-5 ★ 3-19
★ 3-6
★ 3-7

108
Simplifications with Don’t Care Examples
★ F(W,X,Y,Z) = ∑m(0,2,3,5,7,8,9) + ∑d(6,10,11,12,13,14,15)
F(W,X,Y,Z)=W+Y+XZ+X’Z’

★ G(W,X,Y,Z) = ∑m(0,2,6,8) + ∑d(10,11,12,13,14,15)

G(W,X,Y,Z) = YZ’+X’Z’

109
Home Exercises
★ F1(A,B,C) = ∑ (0,2,3,4,6,7)
● F1=C’+B
★ F2(A,B,C) = ∑ (1,2,5)
● F2=A’BC’+B’C
★ F3(A,B,C) =A’B’C’+A’BC’+A’BC+AB’C’
● F3=A’B+B’C’

110
Home Exercises
★ Simplify F(A,B,C,D)=∑ (0,2,4,6,7,8,9,11,12,14)
★ Answer F=A’D’+BD’+A’BC+AB’D+C’D’

★ Simplify F=A’B’C’+A’BC’+A’BC+AB’C’
★ Answer: F =A’B+B’C’

★ F(w,x,y,z)=∏ (0,1,2,6,8,10,11,12)
★ Answer: F(w,x,y,z)= w’xy’+w’yz+wxy+wy’z

111
Example with more than one solution

★ F(A,B,C)= A’BC’ + A’BC + AB’+ ABC


● F = AB’+A’B+AC
● F = AB’+A’B+BC

★ F(A,B,C,D) = ∑(2,5,6,7,9,10,11,13,15)
● F = BD + AD + A’CD’+ AB’C
● F = BD + AD + A’CD’ + B’CD’
● F = BD + AD + B’CD’+ A’BC

112

You might also like