Download presentation
Presentation is loading. Please wait.
1
Karnaugh Maps References:
Chapters 4 and 5 in Digital Principles (Tokheim) Chapter 3 in Introduction to Digital Systems (Palmer and Perlman)
2
Expressing truth tables
Every truth table can be expressed in terms of the basic Boolean operators AND, OR and NOT operators. The circuits corresponding to those truth tables can be build using AND, OR and NOT gates, which can be made out of transistors. The input in each line of a truth table can be expressed in terms of AND’s and NOT’s
3
Line by Line Inputs Expression A B A´B´ 1 A´B AB´ AB
(Not A) AND (NOT B) A´B´ A´B´ is true for the first line and false for the rest 1 (Not A) AND B A´B A´B is true for the second line and false for the rest A AND (NOT B) AB´ AB´ is true for the third line and false for the rest A AND B AB A´B´ is true for the fourth line and false for the rest This is not yet a truth table. It has no outputs.
4
It’s true; it’s true To express a truth table, take the input lines that correspond to true (high, 1) outputs. Write the expressions for each of those input lines (as shown on the previous slide). Then feed all of those expressions into an OR gate.
5
Example 1 A B C Out 1
6
Example 1 (Cont.) A’B’C’ + A’BC’ + AB’C + ABC
The expression one arrives at in this way is known as the sum of products. You take the product (the AND operation) first to represent a given line. Then you sum (the OR operation) together those expressions.
7
Example 2 A B C Out 1
8
Example 2 (Cont.) A’B’C + A’BC’ + A’BC + AB’C’ + AB’C + ABC’ + ABC
But isn’t that just the truth table for A+B+C ? There is another way to write the expression for truth tables.
9
Example 2 (Cont.) A B C Out 1 In this approach, one looks at the 0’s instead of the 1’s.
10
Example 2 (Cont.) One writes expressions for the lines which are 1 everywhere except the line. Then one ANDs those expressions together. The expression obtained this way is known as the product of sums.
11
Expressions A B C Expression A + B + C 1 A + B + C’ A + B’ + C
A + B + C 1 A + B + C’ A + B’ + C A + B’ + C’ A’ + B + C A’ + B + C’ A’ + B’ + C A’ + B’ + C’
12
Return to Example 1 A B C Out 1
13
Return to Example 1 (Cont.)
The product of sums expression is (A+B+C’)(A+B’+C’)(A’+B+C)(A’+B’+C)
14
Algebra Gate A’ means NOT A Red probe indicator high input high
low low output
15
Algebra Gates AB means A AND B
16
Algebra Gates A+B means A OR B
17
Simplifying Boolean algebra expressions
Recall that (A’B’C + A’BC’ + A’BC + AB’C’ + AB’C + ABC’ + ABC) and (A+B+C) correspond to the same truth table. Before building a circuit that realizes a Boolean expression, we would like to simplify that expression as much as possible. Fewer gates means Fewer transistors Less space required Less power required More money made
18
A few fundamental theorems
A + 0 = A A·1 = A A·0= 0 A + A = A A·A = A A + A’ = 1 A·A’ = 0
19
A Trivial Example A B C Out 1 A’BC’ A’BC ABC’ ABC
20
Simplifying a trivial example
A´BC´ + A´BC + ABC´ + ABC A´B (C´ + C) + AB (C´ + C) A´B + AB (A´ + A) B B C+C’ means C OR (NOT C) In other words, we don’t care about C
21
Majority Rules Example
B C Majority 1
22
Row Expressions A B C Row expressions A’B’C’ 1 A’B’C A’BC’ A’BC AB’C’
A’B’C’ 1 A’B’C A’BC’ A’BC AB’C’ AB’C ABC’ ABC
23
Majority rules (sum of products) without simplification
A´BC + AB´C + ABC´ + ABC NOTs OR ANDs
24
Majority Rules Simplification
A´BC + AB´C + ABC´ + ABC A´BC+AB´C+ABC´+ABC+ABC+ABC A´BC+ABC+AB´C+ABC+ABC´+ABC (A´+A)BC+A(B´+B)C+AB(C´+C) BC+AC+AB
25
Majority rules without simplification
26
Majority Rules Comparison
27
Simplifying made easy Simplifying Boolean expressions is not always easy. So we introduce next a method (a Karnaugh or K map) that is supposed to make simplification more visual. The first step is to rearrange the inputs in what is called “gray code” order.
28
Frank Gray in Wikipedia
PHY 201 (Blum)
29
PHY 201 (Blum)
30
Gray code In addition to binary numbers, there is another way of representing numbers using 1’s and 0’s. It is not useful for doing arithmetic, but has other purposes. In gray code the numbers are ordered such that consecutive numbers differ by one bit only.
31
Gray code (Cont.) 1 Each row different by one bit only
32
Constructing Gray code
1
33
Reflect lower bits and 0’s then 1’s in front
1 Add 0’s Reflect lower bits through red line Add 1’s
34
Reflect lower bits and 0’s then 1’s in front (again)
1 Add 0’s Reflect lower bits through red line Add 1’s
35
An important property In gray-code order, two consecutive rows of a truth table differ by one bit only. Thus if a truth table is put in gray code order and if two consecutive rows contain a 1, then a simplification of the Boolean expression is possible. A term like X + X’ can be factored out.
36
Trivial Example in Gray code
B C Out 1
37
Improving Some combinations that differ only by a single bit are not in consecutive rows. Thus we might miss such a simplification. So we put some of the inputs in as columns.
38
Two rows that differ by one bit but are not consecutive
Out 1
39
A row-column version A B\C 1 Place the C inputs across the top.
All inputs are filled in with light blue. In this version, more inputs differing by one bit only are in adjacent positions. A B\C 1
40
Karnaugh-map This way of arranging truth tables combined with the rules for simplifying Boolean expressions goes by the name Karnaugh map or K map.
41
Maurice Karnaugh PHY 201 (Blum)
42
The rules Put the truth table into a form with inputs in gray code order. Then one identifies output “blocks” (as large as possible). A block must be a rectangle containing 1’s and only 1’s. The simplification rules require that the number of 1’s in a block should be a power of 2 (1, 2, 4, 8, …). However, a given output 1 can belong to more than one block.
43
Wrapping There are still cases in which inputs differing by only one bit are not adjacent (e.g. the first and last row). Imagine that the rows wrap around, so for instance, a block can include the top and bottom rows (without intermediate rows). Similarly for columns.
44
W X Y Z Output 1 Karnaugh Example
45
Karnaugh Example (Unsimplified Boolean algebra expression)
WXY’Z W’XY’Z + WX’Y’Z’ + W’X’Y’Z’ + WXYZ’ WXY’Z’ + W’XY’Z’ + W’XYZ’
46
Example in Karnaugh (identifying block in gray code truth table)
Z 1 W X\Y W’X’Y’Z’ W’XY’Z’ W’XY’Z W’XYZ’ WXY’Z’ WXY’Z WXYZ’ WX’Y’Z’
47
Result Y’Z’ + XY’ + X Z’ A block of size two eliminates one Boolean variable; a block of four eliminates two Boolean variables; and so on. To find the expression for a block, identify the inputs for that block that don’t change, AND them together, that’s your expression for the block. Obtain an expression for each block and OR them together. Every 1 must belong to at least one block (even if it is a block onto itself).
48
Online References PHY 201 (Blum)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.