


























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
logical gate
Typology: Study notes
1 / 34
This page cannot be seen from the preview
Don't miss anything!
Boolean Cubes and Boolean Functions
0 1
01
(^1011)
00
(a) n = 1
(b) n = 2
(c) n = 3
(d) n = 4
1100
0000
0010 0011 0001 0110 0111 0101 1111
1011 (^10001001)
1110
1110
0100
000
010 011
111 101
110
001
100
Figure 1: Boolean cubes [Gajski].
Example 1 Fig. 2 shows the truth table and the corresponding cube representations of the carry and sum functions. 2
(c) Sum function s (^) i
(b) Carry function c^ i+
(a) Truth table
c (^) i x (^) i yi^ c^ i+1 s (^) i (^00 00 01 00 ) (^00 11 01 01 ) (^11 00 01 01 ) (^11 11 01 11 )
000
010 011
111 101
110
001
000
010 011
111 101
110
001
100
100
Figure 2: Boolean-cube representations for carry and sum functions [Gajski].
/ K-maps provide visual aid to identify PIs and EPIs. / They are used for manual minimization of Boolean functions.
Exercise 1 How do you transform a K-map into a truth table? Is it unique? How do you transform a K-map into an n-cube? Is it unique? 2
Two- and Three-Variable Maps
1 1 m^3
m 2
m 1
m 0 1 0
0 1
0 0
x y f
2-var map 2-var map f^ =^ xy^ x^ +^ y^ (x^ ^ y^ )^0
xy 0 xy
x^0 y 0 x^0 y 1
1 1 1
1 1
xy 0 1
x y^0 0 1
0 1 0 1
1
0
(^01) x^ y
1
0
x^ y
m 2 m 3
m 0 m 1
Figure 4: Two-variable maps.
xy 0 z 0 xy 0 zxy^ z xy z 0
x^0 y 0 z 0 x^0 y 0 z x^0 y z x^0 y z 0
3-var map 3-var map f^ =^ z^ x^0 y + xy 0
1 1
1 1 1 1 1 1
xy^ z 0 1
00 01 11 10 00 01 11 10
1
0
00 01 11 10 x^ y^ z
1
0
x^ y^ z
m 4 m 5 m 7 m 6
m 0 m 1 m 3 m 2
Figure 5: Three-variable maps.
(a)
m 0 m 1 m 3 m (^2)
m 4 m 5 m 7 m (^6)
YZ X 0
00 01 X Y Z X Y Z X Y Z X Y Z
X Y Z X Y Z X Y Z X Y Z
11 10
Y
X 1
Z (b) Fig. 2-10 Three-Variable Map
Figure 6: Three-variable map simplification [Mano & Kime].
Minterms are arranged in the Gray-code sequence. (Why?)
Any 2 (horizontally or vertically) adjacent squares differ by exactly 1 vari- able, which is complemented in one square and uncomplemented in the other.
Any 2 minterms in adjacent squares that are ORed together will cause a re-
0^01 1^11^3^10 2
4 5 7 6
0
1
i^0
x y i i c 1
1 1 1
0^01 1^11 3^10 2
4 5 7 6
0
1
i i^ i^0
x y c 1
1 1
1
Figure 7: K-maps for the carry and sum functions [Gajski].
Example 2
P
P
0 1
Y
Z
X
(b) F 2 (X, Y, Z) = Σm(0, 2, 4, 5, 6) = Z + XY
00 01 11 10 1
YZ X
1
1 1 1
0 1
Y
Z
X 1
00 01 11 10 1
YZ X
1 1
(a) F 1 (X, Y, Z) = Σm(3, 4, 6, 7) = YZ + XZ Fig. 2-14 Maps for Example 2-
2
Example 5
P
A PI is a product term obtained by combining the maximum possible number of adjacent squares in the map.
Pick the EPIs that minimize the number of literals.
Minimize the number of groupings.
Maximize their sizes.
Example 6 Show the region in the K-map that is represented by X 0 Z 0.
(a)
00 01
00 01
YZ WX
Y
Z
W
11 10
11 10
X
0 1 3 2
4 5 7 6
8 9 11 10
(^12 13 )
XZ
0 2 8 10
1 3
9
11
X Z
(b) Fig. 2-18 Four-Variable Map: Flat and on a Torus to Show Adjacencies
2
Example 7
P
00
01
00 01
YZ WX
Y
Z
W
11 10
11
10
X
1 1 1
1 1 1
1 1
(^1 1 )
Fig. 2-19 Map for Example 2-5: F = Y + WZ + XZ
2
m m 1 m m m m m m m m m m m m
m m m m m m m m m m m m m m m m
m m m m m m m m m m m m m m m
m m m m m m m m m m m m m m m m
0 3 m^2 4 m^5 7
8 9 11 10
12 13 15 14
16 17 19 18 20 21 23 22
24 25 27 26
32 33 35 34 36 37 39 38
40 41 43 42
44 45 47 46
48 m 49 51
28 29 31 30
50 52 53 55 54
56 57 59 58
60 61 63 62
00 01 11 10 00 01 11 10 00 01 11 10
00 01 11 10
v = 0 v = 1
u = 0
u = 1
12 13 15 14 8 9 11 10
0 1 3 2 4 5 7 6 20 21
16 17 19 18 23 22
24 25
28 29 31 30 27 26
32 33 35 34 36 37 39 38 46 43 42
45 47 40 41
44
48 52 60 56
49 53 61 57 59 58
63 62
55
51 50 54
xy
zw
00 01 11 10 00 01 11 10 00 01
11 10
00 01
11 10
v = 0 v = 1
u = 0
u = 1
’ ’
(^12131514) ’ 8 9 11 10
0 1 3 2 4 5 7 6 20 21
16 17 19 18 23 22
24 25
28 29 31 30 27 26
32 33 35 34 36 37 39 38 46
43 42
45 47
40 41
44
48 52 60
56
49 53 61
57 59 58
63 62
55
51 50 54
xy
zw
x v
xz
z w
Figure 10: Six-variable K-maps [Gajski].
Theorem 1 In a K-map, 2 minterms are adjacent iff they differ in exactly 1 variable.
K-map such that:
I the map is extended in each dimension on 2 of the variables; I the extension sequence in each dimension is a Gray sequence.
Simplification Using K-Maps
f = A^0 D 0 + C 0 + B D 0 f 0 = C D + AB 0 C
0 0
0
0
0
CD AB CD AB
1
1
1
1 1
1 1
1 1
1 1 00 01 11 10
00 01 11 10 00 01 11 10
10
11
01
00
Figure 11: The complement of f 0 gives f in pos.
Example 9 We want to simplify the following function in sop & pos:
X
(a) Mark the map with 1s and 0s according to the function.
(b) Use the 1s to determine the EPIs of f , which immediately give the sop form:
(c) Use the 0s to determine the EPIs of f 0 , and complement it to give the pos form:
00 01
00 01
CD AB
C
D
A
11 10
11 10
B
1 1
1
1 1 1
1
00 01
00 01
CD AB
C
D
A
11 10
11 10
B
1 1
1
1 1 1
1
(a) Plotting the minterms (b) Essential prime implicants Fig. 2-22 Simplification with Prime Implicants in Example 2-
Figure 13: Simplification with PIs for f = P (0; 5 ; 10 ; 11 ; 12 ; 13 ; 15) [Mano & Kime].
1 2
3 00 01
00 01
CD AB
C
D
A
11 10
11 10
B
1
1
1 1
1
1
1 1
1
Fig. 2-23 Map for Example 2-
Figure 14: Simplification with PIs for f = P (0; 1 ; 2 ; 4 ; 5 ; 10 ; 11 ; 13 ; 15) [Mano & Kime].
Exercise 2 Does the minimal cover of PIs contain only EPIs? 2
Example 10 Simplify the following Boolean function in the pos form:
P
00 01
00 01
CD AB
C
D
A
11 10
11 10
B
1 1 0 1 0 1 0 0 0 0 0 0 1 1 0 1
Fig. 2-24 Map for Example 2-10: F = ( A + B) ( C + D) ( B + D)
Exercise 3
Don’t-Care Conditions
In practice, there are applications where the function is not specified for cer- tain combinations of the input variables. For example, in the 4-bit BCD code for the decimal digits, the outputs are unspecified for the input combinations 1010-1111.
Functions that have unspecified outputs for some input combinations are called incompletely specified functions.
The unspecified minterms of a function are called the don’t-care conditions, or simply the don’t-cares, and are denoted as Xs.
These don’t-care conditions can be used on a map to provide further simpli- fication of the Boolean expression.
The tabulation method is a specific step-by-step (algorithmic) procedure that is guaranteed to produce a simplified standard-form expression for a function.
It can be applied to problems with any number of variables.
It is suitable for machine computation.
It however is quite tedious for human use.
The tabulation method was first formulated by Quine (1952) and later im- proved by McCluskey (1956), thus known as the Quine-McCluskey method.
/ Step 1: Exhaustive search of all PIs.
Determination of PIs
The goal of the Quine-McCluskey algorithm is a special case of the follow- ing: Select the smallest possible subset, D , of a set of objects, A , so that some criterion, f , is satisfied.
The set D will consist of all products in the minimal sop realization of a given Boolean function f , of which the set A contains all possible products.
P
(a) (b) (c) w xy z w xy z w xy z 0 0000 3 0,1 000– 0,2,8,10 –0– 0,2 00–0 3 0,8,2,10 –0– 1 0001 3 0,8 –000 3 2 0010 3 10,11,14,15 1–1– 8 1000 3 2,10 –010 3 10,14,11,15 1–1– 8,10 10–0 3 10 1010 3 10,11 101– 3 11 1011 3 10,14 1–10 3 14 1110 3 11,15 1–11 3 15 1111 3 14,15 111– 3
¬ Group the minterms according to the number of 1s (see Column (a)). Combine any 2 minterms that differ from each other by exactly one variable (i.e., dist-1), the unmatched variable removed (see Column (b)). Try this for all possible pairs of minterms. A check ( 3 ) is placed to the right of both minterms if they have been used in a match.
® Repeat the process. Combine any 2 product terms from Step that differ from each other by exactly one variable, the unmatched variable removed (see Column (c)).
¯ The unchecked terms in the table form the PIs. Some of the product terms may appear twice in the table. It of course is unnecessary to use the same term twice.
*Multi-Output Minimization Using Maps
Identify all possible PIs that cover each implicated minterms in each output expression, and search for a minimal cover by using shared terms.
The Quine-McCluskey method also can be extended for this purpose.
X
X
X
f 1 f 2 f 3
Figure 16: Simplification of multiple output functions.
*XOR & XNOR Patterns on the Map
A BC 0 1
00 01 11 10
1 1
A BC 0 1
00 01 11 10 1 1 kitty-corner offset (A B )C A(B C )
ABCD^ 00 01 11 10 00 01 11 10
ABCD 00 01 11 10 00 01 11 10 10
11
01
00
CD AB^00011110
1
1 1
1
1 1
1 1 1 1
1 1
1 1
1 1
f 1 f 2 f 3
Figure 17: XOR/XNOR patterns on the map.