Lecture 6-Combinatorial Networks-Karnaugh Mapping
Lecture 6-Combinatorial Networks-Karnaugh Mapping
1
MECHATRONICS LAB
ME 140L
COMBINATORIAL CIRCUITS
AND KARNAUGH MAPPING
A. BOOLEAN ALGEBRA
Note: Product is 1 iff all terms are1 and Sum is 0 iff all terms are 0.
Product is 0 iff one term is 0
2
LOGIC DEVICES (3-input shown)
AND OR XOR NOT
3
II. COMBINATORIAL NETWORKS
Combinations of binary inputs to generate a desired binary output
For each combination of A and B, only one xi goes high: called Truth Table
A B Output
0 0 x1
0 1 x2
1 0 x3
1 1 x4
Use ANDs and Inverters only to implement a combinatorial circuit that
will mimic the 2-to-4 decoder
x3
x4 x1
x2
x3
x4 x1
x2
4
A. Combinatorial Networks: Sum of Products
Example: Given a Truth Table, Design a Combinatorial Circuit using Logic Gates
INPUTS
A B C OUTPUT X Note: 3 inputs (0 or 1)
0 0 0 0 will have 23=8 combinations
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 0
Approach 1
Sum-of-Products: For each 1 in the output column, find the product
involving all the inputs and sum all the products together.
X = A B C + ABC + ABC (called minterms) → note sum of products
Now apply Boolean Algebra to reduce the expression to ' minimal' form :
X = A(BC + BC) + ABC = AC(B + B) + ABC = AC + ABC = (A + AB)C
Approach 2
Product-of-Sums: For each 0 in the output column, find the sum
involving all the inputs and multiply all the sums together. If column entry
is 0, use its corresponding variable directly, if entry is 1, use the
complement of variable. Then use Boolean algebra to reduce expression.
X = (A + B + C)(A + B + C)(A + B + C)(A + B + C)(A + B + C )
5
III. KARNAUGH MAPPING
Minimizes sum-of-products expressions in a systematic way
From the previous example, entries of truth table are put in a Karnaugh map:
AB AB
00 01 11 10 00 01 10 11
C 0 0 0 0 0 C 0 0 0 0 0
1 1 1 0 1 1 1 1 1 0
Note: as you group the 1’s, you reduced the number of inputs in the expression,
thereby reducing the expressions and reducing the number of logic gates needed.
A
B
B
X A
X
C C
6
Examples:
AB
00 01 11 10
C 0 0 1 1 1
1 0 1 0 0
SOP : X = AB + AC
AB
00 01 11 10
CD 00 1 0 0 0
01 1 1 1 1
11 1 0 0 1
10 1 0 0 0
SOP : X = A B + C D + BD
AB
00 01 11 10
CD 00 Y 1 0 1
01 1 Y 0 Y
11 1 0 0 1
10 Y 0 Y 1
AB AB
00 01 11 10 00 01 11 10
CD 00 0 1 0 1 CD 00 1 1 0 1
01 1 1 0 1 01 1 1 0 1
11 1 0 0 1 11 1 0 0 1
10 0 0 0 1 10 1 0 0 1
SOP : X = AB + BD + AB C SOP : X = B + A C
7
AB
00 01 11 10
CD 00 1 1 0 1
01 1 1 0 1
11 1 0 0 1
10 0 0 0 1
SOP : X = AB + A C + BD
8
Example: To provide water for his cattle, a farmer purchased a circular, four-
outlet water dispenser shown below. In order to couple the dispensing of
water with the dispensing of food, the farmer decides to add a digital circuit.
The water dispenser will turn ‘on’ a feeding device: 1) when any two
adjacent water outlets are used simultaneously but will turn the feeder device
‘off’ if 2) all four water outlets are used simultaneously.
Truth Table AB
A B C D F 00 01 11 10
0 0 0 0 0 00 0 0 1 0
0 0 0 1 0 CD 01 0 0 1 1
0 0 1 0 0 11 1 1 0 1
0 0 1 1 1 10 0 1 1 0
0 1 0 0 0
0 1 0 1 0 F = ACD + BCD + ABC + ABD
0 1 1 0 1
0 1 1 1 1 A
1 0 0 0 0 B
1 0 0 1 1
1 0 1 0 0 C
F
1 0 1 1 1
1 1 0 0 1
1 1 0 1 1
1 1 1 0 1 D
1 1 1 1 0
1 1 1 0 1
1 1 1 1 0
9
APPENDIX: PRODUCT OF SUMS (FYI only for ME140L)
INPUTS
A B C OUTPUT X
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 0
Sum is 0 iff all of its terms are 0. Product is 0 iff one of the factors is zero.
Form a sum for each row in which the output is zero and multiply the sums together.
If a column entry is 0, its corresponding variable is used directly, otherwise its
complement is used.
Alternatively : Solve for the 0s as you would for the 1' s in sum of products.
Complement the resulting expression
X = A B C + A B C + A B C + AB C + ABC
X = A (B + B) C + AB C + A B(C + C ) = AC + AB C + AB = (A + AB) C + AB and
using the (*) result : X = ABC + AB → Let Z = AB, then C Z + Z = C + Z = C + AB
X = C + AB = CAB Same as above
10