SlideShare une entreprise Scribd logo
1  sur  90
Karnaugh Maps
-- A tool for representing
Boolean functions
We can come close to our aim by using a graphical
notation named Karnaugh Map that will be defined in
next slides
Karnaugh Map Technique
• A K-Map is simply a folded truth table, where physical
adjacency implies logical adjacency
• K-Maps are most commonly used hand method for logic
minimization.
• K-Maps are a graphical technique used to simplify a logic
equation.
• K-Maps are procedural and much cleaner than Boolean
simplification.
• K-Maps can be used for any number of input variables, BUT
are only practical for two, three, and four variables.
3
Terminology
•Implicant : Product term that implies function
• Prime Implicant : An Implicant that is not completely covered by
any other Implicant but itself
• Essential prime Implicant : A prime Implicant that has a minter
not covered by any other prime Implicant
• Product term : An and expression
4
Terms
Terminology
•Minterm : We define a Minterm to be a product that contains all variables of
that particular switching function in either complemented or non-complemented
form
• Maxterm : We define a Maxterm to be a sum that contains all variables of
that particular switching function in either complemented or non-complemented
form
•Standard SOP(Sum Of Products) : In standard SOP, the products
are obtained directly from the Karnaugh map or truth table, so the SOP
contains all of the variables of the function
•Standard POS(Product Of Sums) : In standard POS, the products
are obtained directly from the Karnaugh map or truth table, so the POS
contains all of the variables of the function
5
Terms
6
minterm
ID A B f(A,B) minterm
0 0 0 0
1 0 1 1 A’B
2 1 0 1 AB’
3 1 1 1 AB
An example of 2-variable function f(A,B)=A+B
Simplification Goals
• Goal -- minimize the cost of realizing a switching function
• Cost measures and other considerations
– Number of gates
– Number of levels
– Interconnection complexity
– Preventing hazards
• Two-level realizations
– Minimize the number of gates (terms in switching function)
Minimization of Boolean expressions
• The minimization will result in reduction of the number of gates
(resulting from less number of terms) and the number of inputs
per gate (resulting from less number of variables per term)
• The minimization will reduce cost, efficiency and power
consumption.
•y(x+x`)=y.1=y
•y+xx`=y+0=y
•(x`y+xy`)=x⊕y
•(x`y`+xy)=(x⊕y)`
Karnaugh Maps
• Boolean algebra helps us simplify expressions and circuits
• Karnaugh Map: A graphical technique for simplifying a Boolean expression
into either form:
– sum of products (SOP)
– product of sums (POS)
• Goal of the simplification.
– There are a minimal number of product/sum terms
– Each term has a minimal number of literals
• Circuit-wise, this leads to a minimal two-level implementation
Minimum SOP
• f= (xyz +x`yz+ xy`z+ …..)
Is called sum of products.
The + is sum operator which is an OR gate.
The product such as xy is an AND gate for the two inputs x and y.
Examples
• Two variable K-map f(A,B)=∑m(0,1,3)=A`B`+A`B+AB
1 0
1 1
A 0 1
B01
V
0 0
0 0
B
A
A
Groups of One – 4
Two Variable K-Map Groupings
BA
1
BA
1 1
A B
BA
1
B
12
V
0 0
0 0
B
A
A
Groups of Two – 4
Two Variable K-Map Groupings
B
A
1 1
A
1 1
1
B
1
1
B
1
13
V
1 1
1 1
B
A
A
Group of Four – 1
Two Variable K-Map Groupings
1
B
14
Three Variable K-Map Groupings
V
0 0
0 0
0 0
0 0
C C
BA
BA
BA
BA
BA
1 1
BA
1 1
BA
1 1
BA
1 1
1
CA
1
1
CA
1
1
CA
1
1
CB
1
1
CB
1
1
CA
11
CB
1
1
CB
1
Groups of One – 8 (not shown)
Groups of Two – 12
15
Groups of Four – 6
Three Variable K-Map Groupings
V
0 0
0 0
0 0
0 0
C C
BA
BA
BA
BA
1
C
1
1
1
1
C
1
1
1
A
1 1
1 1
B
1 1
1 1
A
1 1
1 1
B
1 1
1 1
16
Group of Eight - 1
Three Variable K-Map Groupings
V
1 1
1 1
1 1
1 1
C C
BA
BA
BA
BA
1
17
Three variable map
• f(A,B,C) = ∑m(0,3,5)=
A`B`C`+A`BC+AB`C
1
1
A`BC
1
AB`C
A`B`
0 0
A`B
0 1
A B
1 1
A B`
1 0
C`
0
C
1
A`B`C`
19
minterm
ID A B f(A,B) minterm
0 0 0 0
1 0 1 1 A’B
2 1 0 1 AB’
3 1 1 1 AB
An example of 2-variable function f(A,B)=A+B
20
Function can be represented by sum of minterms:
f(A,B) = A’B+AB’+AB
This is not minimal however!
We want to minimize the number of literals and terms.
We factor out common terms –
A’B+AB’+AB= A’B+AB’+AB+AB
=(A’+A)B+A(B’+B)=B+A
Hence, we have
f(A,B) = A+B
21
K-Map: Truth Table in 2 Dimensions
A = 0 A = 1
B = 0
B = 1
0 2
1 3
0 1
1 1
A’B
AB’
AB
f(A,B) = A + B
22
ID A B f(A,B) minterm
0 0 0 0
1 0 1 1 A’B
2 1 0 0
3 1 1 1 AB
Another Example f(A,B)=B
f(A,B)=A’B+AB=(A’+A)B=B
23
On the K-map:
A = 0 A= 1
B= 0
B = 1
0 2
1 3
0 0
1 1
A’B AB
f(A,B)=B
24
ID A B f(A,B) Maxterm
0 0 0 0 A+B
1 0 1 1
2 1 0 0 A’+B
3 1 1 1
Using Maxterms
f(A,B)=(A+B)(A’+B)=(AA’)+B=0+B=B
Maxterm example
f(A,B,C) = ∏M(1,2,4,6,7)
=(A+B+C`)(A+B`+C)(A`+B+C) )(A`+B`+C) (A`+B`+C`)
Note that the complements are (0,3,5) which are the minterms of the previous example
0 0 0
0 0
A`B` A`B AB AB`
C`
C
(A+B) (A+B`) (A`+B`) (A`+B)
C
C`
Re-arranging the Truth Table
• A two-variable function has four possible minterms. We can re-arrange
these minterms into a Karnaugh map
• Now we can easily see which minterms contain common literals
– Minterms on the left and right sides contain y’ and y respectively
– Minterms in the top and bottom rows contain x’ and x respectively
x y minterm
0 0 x’y’
0 1 x’y
1 0 xy’
1 1 xy
Y
0 1
0 x’y’ x’y
X
1 xy’ xy
Y
0 1
0 x’y’ x’y
X
1 xy’ xy
Y’ Y
X’ x’y’ x’y
X xy’ xy
Karnaugh Map Simplifications
• Imagine a two-variable sum of minterms:
x’y’ + x’y
• Both of these minterms appear in the top row of a Karnaugh map, which
means that they both contain the literal x’
• What happens if you simplify this expression using Boolean algebra?
x’y’ + x’y = x’(y’ + y) [ Distributive ]
= x’ • 1 [ y + y’ = 1 ]
= x’ [ x • 1 = x ]
Y
x’y’ x’y
X xy’ xy
More Two-Variable Examples
• Another example expression is x’y + xy
– Both minterms appear in the right side, where y is uncomplemented
– Thus, we can reduce x’y + xy to just y
• How about x’y’ + x’y + xy?
– We have x’y’ + x’y in the top row, corresponding to x’
– There’s also x’y + xy in the right side, corresponding to y
– This whole expression can be reduced to x’ + y
Y
x’y’ x’y
X xy’ xy
Y
x’y’ x’y
X xy’ xy
A Three-Variable Karnaugh Map
• For a three-variable expression with inputs x, y, z, the arrangement of
minterms is more tricky:
YZ
00 01 11 10
0 x’y’z’ x’y’z x’yz x’yz’
X
1 xy’z’ xy’z xyz xyz’
YZ
00 01 11 10
0 m0 m1 m3 m2
X
1 m4 m5 m7 m6
Terminology ( cont. )
30
0 0 0 1
1 1 0 1
0 01 11 10
0
1
Karnaugh Map
1 3 2
4 5 7 6
0
AB
C
Figure K-map illustrating implicants
1
C
A B
0 0 0 1 1 1 1 0
0 2 6 4
3 7 5
0
1
B
1 1
1 1 1
A
C
Minterms: {A′B′ C, A′ BC′, A′ BC, ABC′, ABC}
Groups of two minterms: {A′ B, AB, A′ C, BC′, BC}
Groups of four minterms: {B}
Prime implicants: {A′ C, B}
Cover = {A′ C, B}
MSOP = A′ C + B
Generating and Selecting Prime Implicants
1. Count the number of adjacencies for each minterm on the K-map.
2. Select an uncovered minterm with the fewest number of adjacencies. Make
an arbitrary choice if more than one choice is possible.
3. Generate a prime implicant for this minterm and put it in the cover. If this
minterm is covered by more than one prime implicant, select the one that
covers the most uncovered minterms.
4. Repeat steps 2 and 3 until all minterms have been covered.
Generating and Selecting Prime Implicants (Revisited)
1. Circle all prime implicants on the K-map.
2. Identify and select all essential prime implicants for the cover.
3. Select a minimum subset of the remaining prime implicants to complete the
cover, that is, to cover those minterms not covered by the essential prime
implicants.
Example
f(a,b,c,d) = ∑m(3,7,11,12,13,14,15)
=a`b`cd + a`bcd + ab`cd + abc`d`+ abc`d + abcd` + abcd
=cd(a`b` + a`b + ab`) + ab(c`d` + c`d + cd` + cd )
=cd(a`[b` + b] + ab`) + ab(c`[d` + d] + c[d` + d])
=cd(a`[1] + ab`) + ab(c`[1] + c[1])
=ab+ab`cd + a`cd
=ab+cd(ab` + a`)
=ab+ cd(a + a`)(a`+b`)
= ab + a`cd + b`cd
= ab +cd(a` + b`)
f(A,B,C,D) = ∑m(1,2,3,6) = A′C + BC′
1
C
A B
0 0 0 1 1 1 1 0
0 2 6 4
3 7 5
0
1
B
1 1
1 1
A
C
Proper ordering ?
• With this ordering, any group of 2, 4 or 8 adjacent squares on the map
contains common literals that can be factored out
• “Adjacency” includes wrapping around the left and right sides:
• We’ll use this property of adjacent squares to do our simplifications.
x’y’z + x’yz
= x’z(y’ + y)
= x’z • 1
= x’z
x’y’z’ + xy’z’ + x’yz’ + xyz’
= z’(x’y’ + xy’ + x’y + xy)
= z’(y’(x’ + x) + y(x’ + x))
= z’(y’+y)
= z’
Y
x’y’z’ x’y’z x’yz x’yz’
X xy’z’ xy’z xyz xyz’
Z
Y
x’y’z’ x’y’z x’yz x’yz’
X xy’z’ xy’z xyz xyz’
Z
Three-Variable K-Maps
∑ == CB(0,4)f ∑ == BA(4,5)f ∑ == B(0,1,4,5)f ∑ == A(0,1,2,3)f
BC
00
0
01
1
11 10A
1 0 0 0
1 0 0 0
BC
00
0
01
1
11 10A
0 0 0 0
1 1 0 0
BC
00
0
01
1
11 10A
1 1 1 1
0 0 0 0
BC
00
0
01
1
11 10A
1 1 0 0
1 1 0 0
∑ == CA(0,4)f ∑ == CA(4,6)f ∑ == CA(0,2)f ∑ == C(0,2,4,6)f
BC
00
0
01
1
11 10A
0 1 1 0
0 0 0 0
BC
00
0
01
1
11 10A
0 0 0 0
1 0 0 1
BC
00
0
01
1
11 10A
1 0 0 1
1 0 0 1
BC
00
0
01
1
11 10A
1 0 0 1
0 0 0 0
Four Variable K-Map Groupings
V
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
BA
BA
BA
BA
DC DC DC DC
Groups of One – 16 (not shown)
Groups of Two – 32 (not shown)
Groups of Four – 24 (seven shown)
CB
1 1
1 1
DB
1 1
1 1
DA
1
1
1
1
CB
1 1
1 1
DB
1
1
1
1
DA
1
1
1
1 DB11
11
38
Four Variable K-Map Groupings
V
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
BA
BA
BA
BA
DC DC DC DC
Groups of Eight – 8 (two shown)
B
1 1 1 1
1 1 1 1
D
1
1
1
1
1
1
1
1
39
Four Variable K-Map Groupings
V
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
BA
BA
BA
BA
DC DC DC DC
Group of Sixteen – 1
1
40
Four-Variable K-Maps
∑ ••== DCB(0,8)f ∑ ••== DCB(5,13)f ∑ ••== DBA(13,15)f ∑ ••== DBA(4,6)f
∑ •== CA(2,3,6,7)f ∑ •== DB)(4,6,12,14f ∑ •== CB)(2,3,10,11f ∑ •== DB(0,2,8,10)f
CD
00
00
01
01
11
11
10
10
AB
1 0 0 0
0 0 0 0
0 0 0 0
1 0 0 0
CD
00
00
01
01
11
11
10
10
AB
0 0 0 0
0 1 0 0
0 1 0 0
0 0 0 0
CD
00
00
01
01
11
11
10
10
AB
0 0 0 0
0 0 0 0
0 1 1 0
0 0 0 0
CD
00
00
01
01
11
11
10
10
AB
0 0 0 0
1 0 0 1
0 0 0 0
0 0 0 0
CD
00
00
01
01
11
11
10
10
AB
0 0 1 1
0 0 1 1
0 0 0 0
0 0 0 0
CD
00
00
01
01
11
11
10
10
AB
0 0 0 0
1 0 0 1
1 0 0 1
0 0 0 0
CD
00
00
01
01
11
11
10
10
AB
0 0 1 1
0 0 0 0
0 0 0 0
0 0 1 1
CD
00
00
01
01
11
11
10
10
AB
1 0 0 1
0 0 0 0
0 0 0 0
1 0 0 1
Four-Variable K-Maps
CD
00
00
01
01
11
11
10
10
AB
0 0 0 0
1 1 1 1
0 0 0 0
0 0 0 0
CD
00
00
01
01
11
11
10
10
AB
0 0 1 0
0 0 1 0
0 0 1 0
0 0 1 0
CD
00
00
01
01
11
11
10
10
AB
1 0 1 0
0 1 0 1
1 0 1 0
0 1 0 1
CD
00
00
01
01
11
11
10
10
AB
0 1 0 1
1 0 1 0
0 1 0 1
1 0 1 0
CD
00
00
01
01
11
11
10
10
AB
0 1 1 0
0 1 1 0
0 1 1 0
0 1 1 0
CD
00
00
01
01
11
11
10
10
AB
1 0 0 1
1 0 0 1
1 0 0 1
1 0 0 1
CD
00
00
01
01
11
11
10
10
AB
0 0 0 0
1 1 1 1
1 1 1 1
0 0 0 0
CD
00
00
01
01
11
11
10
10
AB
1 1 1 1
0 0 0 0
0 0 0 0
1 1 1 1
f (4,5,6,7) A B= = •∑ f (3,7,11,15) C D= = •∑
f (0,3,5,6,9,10,12,15)= ∑ f (1,2,4,7,8,11,13,14)= ∑
f A B C D= ⊗ ⊗ ⊗ f A B C D= ⊕ ⊕ ⊕
f (1,3,5,7,9,11,13,15)= ∑ f (0,2,4,6,8,10,12,14)= ∑ f (4,5,6,7,12,13,14,15)= ∑ f (0,1,2,3,8,9,10,11)= ∑
f D= f D= f B= f B=
• 4 Variable Maps
– f(A,B,C,D) = Σm(0,1,2,3,6,8,9,11,13,14)
– f = A C' D + B C D' + B' C ' + B' D + A'B'
C D
A B
00 01 11 10
00 1 1 1 1
01 0 0 0 1
11 0 1 0 1
10 1 1 1 0
• Another 4 Variable Map
– f(A,B,C,D) = Σm(0,1,2,5,6,7,8,9,10,13,15)
C D
A B
00 01 11 10
00 1 1 0 1
01 0 1 1 1
11 0 1 1 0
10 1 1 0 1
These are not
essential!
For the Simplest Result
• Make as few rectangles as possible, to minimize the number of products in
the final expression.
• Make each rectangle as large as possible, to minimize the number of literals
in each term.
• Rectangles can be overlapped, if that makes them larger.
K-map Simplification @ SoP Expressions
• Let’s consider simplifying f(x,y,z) = xy + y’z + xz
• You should convert the expression into a sum of minterms form,
– The easiest way to do this is to make a truth table for the function, and
then read off the minterms
– You can either write out the literals or use the minterm shorthand
• Here is the truth table and sum of minterms for our example:
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 0
1 0 1 1
1 1 0 1
1 1 1 1
f(x,y,z) = x’y’z + xy’z + xyz’+ xyz
= m1 + m5 + m6 + m7
Unsimplifying Expressions
• You can also convert the expression to a sum of minterms with Boolean
algebra
– Apply the distributive law in reverse to add in missing variables.
– Very few people actually do this, but it’s occasionally useful.
• In both cases, we’re actually “unsimplifying” our example expression
– The resulting expression is larger than the original one!
– But having all the individual minterms makes it easy to combine them
together with the K-map
xy + y’z + xz = (xy • 1) + (y’z • 1) + (xz • 1)
= (xy • (z’ + z)) + (y’z • (x’ + x)) + (xz • (y’ + y))
= (xyz’ + xyz) + (x’y’z + xy’z) + (xy’z + xyz)
= xyz’ + xyz + x’y’z + xy’z
= m1 + m5 + m6 + m7
Minimum product of sums (POS)
• The minimum product of sums (POS) of a
function, f, is a POS representation of f that
contains the fewest number of sum terms and the
fewest number of literals of any POS
representation of f.
• The zeros are considered exactly the same as
ones in the case of sum of product (SOP)
Example
f(a,b,c,d) = ∏M(0,1,2,4,5,6,8,9,10)
=∑m(3,7,11,12,13,14,15)
= [(a+b+c+d)(a+b+c+d`)(a+b`+c`+d`)
(a`+b+c`+d`)(a`+b`+c+ d)(a`+b`+c+ d`)
(a`+b`+c`+d)(a`+b`+c`+d`)]
PoS Optimization
• Maxterms are grouped to find minimal PoS expression
x +y+z x+y+z’ x+y’+z’ x+y’+z
x’ +y+z x’+y+z’ x’+y’+z’ x’+y’+z
00 01 11 10
0
1
x
yz
PoS Optimization
• F(W,X,Y,Z)= ∏ M(0,1,2,4,5)
x +y+z x+y+z’ x+y’+z’ x+y’+z
x’ +y+z x’+y+z’ x’+y’+z’ x’+y’+z
00 01 11 10
0
1
x
yz
0 0 1 0
0 0 1 1
00 01 11 10
0
1
x
yz
F(W,X,Y,Z)= Y . (X + Z)
Terminology ( cont. )
•Sometimes writing an expression in a POS form is easier as
seen in the following example:
0 1 1 0
1 1 1 1
00 01 11 10
0
1
Karnaugh Map
1 3 2
5 7 64
0
AB
C
52
• POS Minimization
– K-maps can be used for POS minimization, too
– f(A,B,C) = Σm(2,3,6)
• Minimum POS is f = (B)(A' + C') cost = 2 + 4 = 6
• Minimum SOP is f = A'B + BC' cost = 3 + 6 = 9
B C
A
00 01 11 10
0 0 0 1 1
1 0 0 0 1
I don’t care!
• You don’t always need all 2n
input combinations in an n-variable function
– If you can guarantee that certain input combinations never occur
– If some outputs aren’t used in the rest of the circuit
• We mark don’t-care outputs in truth tables and K-maps with Xs.
x y z f(x,y,z)
0 0 0 0
0 0 1 1
0 1 0 X
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 X
1 1 1 1
– Many times there are incompletely specified conditions
• Valuations that can never occur, or for which we “don’t care what
the device does”
– Modeling such a device requires us to specify don’t care conditions in
those instances
• Use X as a value to indicate we don't care what happens
– Don't care situations are often called incompletely specified functions
Don’t Care Conditions
• Example Using Don't Cares
– f(A,B,C,D) = Σm(1,5,8,9,10) + d(3,7,11,15)
– f = A B' + A' D
C D
A B
00 01 11 10
00 0 1 X 0
01 0 1 X 0
11 0 0 X 0
10 1 1 X 1
1. Choose an element from the “on” set
2. Find all maximal groups (prime implicants) of “on” elements and X
elements adjacent to that element
 Note 1: prime implicants are always a power of 2 in size
 Note 2: do not feel compelled to include X’s – use them only
when they provide a larger implicant
3. Repeat steps 1-2 for all elements in the “on” set
4. Select all essential prime implicants
5. For all elements of the “on” set not covered by the essential prime
implicants, select the smallest number of prime implicants that cover
them
Karnaugh Map Method Restated
K-map Summary
• K-maps are an alternative to algebra for simplifying expressions
– The result is a MSP/MPS, which leads to a minimal two-level circuit
– It’s easy to handle don’t-care conditions
– K-maps are really only good for manual simplification of small
expressions...
• Things to keep in mind:
– Remember the correct order of minterms/maxterms on the K-map
– When grouping, you can wrap around all sides of the K-map, and your
groups can overlap
– Make as few rectangles as possible, but make each of them as large as
possible. This leads to fewer, but simpler, product terms
– There may be more than one valid solution
Timing Hazards in Combinational Logic Circuits
• Hazards are undesirable changes in the output of a
combinational logic circuit caused by unequal gate
propagation delays.
• Static hazard (glitch) -- the output momentarily changes from
the correct or static state
– Static 1 hazard -- the output changes from 1 to 0 and back
to 1
– Static 0 hazard -- the output changes from 0 to 1 and back
to 0
• Dynamic hazard (bounce) -- the output changes multiple times
during a change of state
– Dynamic 0 to 1 hazard -- the output changes from 0 to 1 to
0 to 1
– Dynamic 1 to 0 hazard -- the output changes from 1 to 0 to
1 to 0
Illustration of a static hazard.
x 1
x 2
x 3
x 1
y 1
y 2
G 1
G 2
G 3I 1
z ( x 1
, x 2
, x 3
)
( a ) ( b )
x 1
x 2
x 3
y 1
y 2
G 1
G 2
G 3
z ( x 1
, x 2
, x 3
)
x 1
Illustration of a static hazard (con’t)
x 1
x 2
x 3
y 1
y 2
z
T i m e
( c )
t 1
t 2
t 3
t 4
t 5
t 6
D t
D t
D t
Illustration of a static hazard (con’t).
x 1
x 2
x 3
y 1
y 2
z
T i m e
( d )
t 1
t 2
t 3
t 4
t 5
t 6
t 7
t 8
t 9
D t 2
D t 3
D t 1 D t 3
D t 2
D t 3
Identifying hazards on a K-map.
( b )
1
11 1
x 1
x 2
x 3
z
( a )
1
11 1
x 1
x 2
x 3
z
Hazard-free network.
x 1
x 2
x 3
G 1
G 4
G 3
z ( x 1
, x 2
, x 3
)
x 3
G 2
x 1
x 2
Example of a static-0 hazard.
G 1
G 3
G 4
z ( A , B , C , D )
G 2
0
B
D
0
0 0 0 0
0 0
0
C
A
( a )
( b )
A
C
A
D
B
A
C
Example of a static-0 hazard (con’t).
0
B
D
0
0 0 0 0
0 0
0
C
A
G 1
G 4
z ( A , B , C , D )
G 2
G 3
( c )
( d )
A
C
A
D
B
A
C
C
B
D
G 5
Dynamic hazards.
( a ) ( b )
Quine-McCluskey Minimization Method
• Advantages over K-maps
– Can be computerized
– Can handle functions of more than six variables
• Overview of the method
– Given the minterms of a function
– Find all prime implicants (steps 1 and 2)
• Partition minterms into groups according to the number of 1’s
• Exhaustively search for prime implicants
– Find a minimum prime implicant cover (steps 3 and 4)
• Construct a prime implicant chart
• Select the minimum number of prime implicants
Use the Q-M method to find the
MSOP of the function
f(A,B,C,D) = ∏m(2,4,6,8,9,10,12,13,15)
C D
A B
1
0 0 0 1 1 1 1 0
0 4 1 2 8
1 5 1 3 9
3 7 1 5 1 1
2 6 1 4 1 0
0 0
0 1
1 1
1 0
B
D
1 1
1
1 1 1
A
C
1 1
Figure K-map for example 3.30.
List Prime Implicants in Groups
Step 2 -- Generate Prime Implicants
Step 3 -- Prime Implicant Chart
642 8 1 0 1 2 1 3 1 5
×
⊗
√
P I 2
P I 3
P I 4
P I 5
P I 6
* * P I 7
* * P I 1
×
×
× ×
×
×
×
×
×
×
× × ×
9
√ √ √ √
⊗
Step 4 -- Reduced Prime Implicant Chart
642 1 0
×
√
P I 2
* P I 3
* P I 4
P I 5
P I 6
×
×
×
√√ √
× ×
×
×
The Resulting Minimal Realization of f
f(A,B,C,D) = PI1 + PI3 + PI4 + PI7
= 1-0- + -010 + 01-0 + 11-1
= AC′ + B′ CD′ + A′ BD′ + ABD
How the Q-M Results Look on a K-map
C D
A B
0 0 0 1 1 1 1 0
0 4 1 2 8
1 5 1 3 9
3 7 1 5 1 1
2 6 1 4 1 0
0 0
0 1
1 1
1 0
B
1
A
C
1 1
1
D
1
1
1
1 1
Figure 3.33 Grouping of terms.
Covering Procedure
Step 1 -- Identify any minterms covered by only one PI. Select
these PIs for the cover.
Step 2 -- Remove rows covered by the PIs identified in step 1.
Remove minterms covered by the removed rows.
Step 3 -- If a cyclic chart results from step 2, go to step 5.
Otherwise, apply the reduction procedure of steps 1 and 2.
Step 4 -- If a cyclic chart results from step 3, go to step 5.
Otherwise return to step 1.
Step 5 -- Apply the cyclic chart procedure. Repeat step 5 until a
void chart or noncyclic chart chart is produced. In the latter
case, return to step 1.
Coverage Example
f(A,B,C,D) = ∑m(0,1,5,6,7,8,9,10,11,13,14,15)
510 6 8 9 1 0 1 1
×
⊗
√
* * P I 1
P I 2
P I 3
P I 4
P I 5
P I 6
* * P I 7
×
×
×
×
×
× × ×
7
√ √ √ √ √
1 3 1 4 1 5
√ √
⊗
× ×
×
×
×
×
× × ×
× ×
×
×
×
×
×
×
Reduced PI Charts
1 11 05 1 3
×
P I 2
P I 3
P I 4
P I 5
P I 6
×
× ×
×
×
× ×
× ×
×
√ √
×
1 05
* P I 2
* P I 4
Cyclic PI Charts
1. No essential PIs.
2. No row or column coverage.
321 4
×
* P I 1
P I 2
P I 3
P I 4
P I 5
P I 6
× ×
√√
× ×
×
5 6
××
× ×
××
542 6
×
P I 2
P I 3
P I 4
P I 5
P I 6
×
×
×
×
×
×
×
542 6
×
√
* P I 3
P I 4
* P I 5
×
√√ √
× ×
×
×
Using the Q-M Procedure with Incompletely Specified Functions
1. Use minterms and don’t cares when generating prime implicants
2. Use only minterms when finding a minimal cover
Example 3.25 -- Find a minimal sum of products of the following function
using the Quine-McCluskey procedure.
Minimizing Table
PI Chart
732 1 0 1 5 2 7
⊗
√
P I 1
P I 2
P I 3
×
×
1 2
√ √ √ √ √
⊗
× ×
* * P I 4
* * P I 5
* * P I 6
* * P I 7
⊗
⊗
× ×
×
Results of Minimization
f(A,B,C,D,E) = PI1 + PI4 + PI5 + PI6 + PI7 OR
= PI2 + PI4 + PI5 + PI6 + PI7
Half Adder 85
Half Adder (1/2)
 Half-Adder is a circuit which adds two single bits (called X,Y) together, to produce a
result of two bits (called C, S).
 A black-box representation of this circuit is:
Truth table representation is:
X Y C S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
Half
adder
X
Y
(X+Y)
S
C
Half Adder 86
Half Adder (2/2)
 In sum-of-minterms forms:
C = X.Y
S = X'.Y + X.Y'
 Algebraic simplification could simplify S to:
S = X'.Y + X.Y'
= X⊕Y
 Giving:
X Y C S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
X
Y
S
C
Karnaugh maps
Karnaugh maps
Karnaugh maps
Karnaugh maps

Contenu connexe

Tendances

KARNAUGH MAP(K-MAP)
KARNAUGH MAP(K-MAP)KARNAUGH MAP(K-MAP)
KARNAUGH MAP(K-MAP)mihir jain
 
Fuzzy logic Notes AI CSE 8th Sem
Fuzzy logic Notes AI CSE 8th SemFuzzy logic Notes AI CSE 8th Sem
Fuzzy logic Notes AI CSE 8th SemDigiGurukul
 
Bubble sort | Data structure |
Bubble sort | Data structure |Bubble sort | Data structure |
Bubble sort | Data structure |MdSaiful14
 
Karnaughmaprev1 130728135103-phpapp01
Karnaughmaprev1 130728135103-phpapp01Karnaughmaprev1 130728135103-phpapp01
Karnaughmaprev1 130728135103-phpapp01Neha Agarwal
 
IEEE floating point representation
 IEEE floating point representation IEEE floating point representation
IEEE floating point representationMaskurAlShalSabil
 
7-NFA to Minimized DFA.pptx
7-NFA to Minimized DFA.pptx7-NFA to Minimized DFA.pptx
7-NFA to Minimized DFA.pptxSLekshmiNair
 
Predicate calculus
Predicate calculusPredicate calculus
Predicate calculusRajendran
 
Minimization of Boolean Functions
Minimization of Boolean FunctionsMinimization of Boolean Functions
Minimization of Boolean Functionsblaircomp2003
 
Quine Mc Clusky (Tabular) method
Quine Mc Clusky (Tabular) methodQuine Mc Clusky (Tabular) method
Quine Mc Clusky (Tabular) methodSyed Saeed
 
Addition and subtraction with signed magnitude data (mano
Addition and subtraction with signed magnitude data (manoAddition and subtraction with signed magnitude data (mano
Addition and subtraction with signed magnitude data (manocs19club
 
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptxDLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptxSaveraAyub2
 
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...DrkhanchanaR
 

Tendances (20)

KARNAUGH MAP(K-MAP)
KARNAUGH MAP(K-MAP)KARNAUGH MAP(K-MAP)
KARNAUGH MAP(K-MAP)
 
Fuzzy logic Notes AI CSE 8th Sem
Fuzzy logic Notes AI CSE 8th SemFuzzy logic Notes AI CSE 8th Sem
Fuzzy logic Notes AI CSE 8th Sem
 
Conditional branches
Conditional branchesConditional branches
Conditional branches
 
Karnaugh Graph or K-Map
Karnaugh Graph or K-MapKarnaugh Graph or K-Map
Karnaugh Graph or K-Map
 
Bubble sort | Data structure |
Bubble sort | Data structure |Bubble sort | Data structure |
Bubble sort | Data structure |
 
pipelining
pipeliningpipelining
pipelining
 
Karnaughmaprev1 130728135103-phpapp01
Karnaughmaprev1 130728135103-phpapp01Karnaughmaprev1 130728135103-phpapp01
Karnaughmaprev1 130728135103-phpapp01
 
Modified booth
Modified boothModified booth
Modified booth
 
IEEE floating point representation
 IEEE floating point representation IEEE floating point representation
IEEE floating point representation
 
7-NFA to Minimized DFA.pptx
7-NFA to Minimized DFA.pptx7-NFA to Minimized DFA.pptx
7-NFA to Minimized DFA.pptx
 
Predicate calculus
Predicate calculusPredicate calculus
Predicate calculus
 
Quine Mc Cluskey Method
Quine Mc Cluskey MethodQuine Mc Cluskey Method
Quine Mc Cluskey Method
 
Minimization of Boolean Functions
Minimization of Boolean FunctionsMinimization of Boolean Functions
Minimization of Boolean Functions
 
K map
K mapK map
K map
 
kmap
kmapkmap
kmap
 
Quine Mc Clusky (Tabular) method
Quine Mc Clusky (Tabular) methodQuine Mc Clusky (Tabular) method
Quine Mc Clusky (Tabular) method
 
funnel shifter
funnel shifterfunnel shifter
funnel shifter
 
Addition and subtraction with signed magnitude data (mano
Addition and subtraction with signed magnitude data (manoAddition and subtraction with signed magnitude data (mano
Addition and subtraction with signed magnitude data (mano
 
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptxDLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
 
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
 

En vedette

Karnaugh Mapping Explained
Karnaugh Mapping ExplainedKarnaugh Mapping Explained
Karnaugh Mapping Explainedml4ml4
 
Logic simplification sop and pos forms
Logic simplification sop and pos formsLogic simplification sop and pos forms
Logic simplification sop and pos formsManesh T
 
Kmap Slideshare
Kmap SlideshareKmap Slideshare
Kmap Slidesharetech4us
 
Mapas de Karnaugh (introdução, até 4 variáveis)
Mapas de Karnaugh (introdução, até 4 variáveis)Mapas de Karnaugh (introdução, até 4 variáveis)
Mapas de Karnaugh (introdução, até 4 variáveis)Fernando Passold
 
Boolean algebra And Logic Gates
Boolean algebra And Logic GatesBoolean algebra And Logic Gates
Boolean algebra And Logic GatesKumar
 
Low Cost Housing Concept
Low Cost Housing ConceptLow Cost Housing Concept
Low Cost Housing ConceptDr K M SONI
 
Ch4 Boolean Algebra And Logic Simplication1
Ch4 Boolean Algebra And Logic Simplication1Ch4 Boolean Algebra And Logic Simplication1
Ch4 Boolean Algebra And Logic Simplication1Qundeel
 
low cost construction
low cost constructionlow cost construction
low cost constructionricha_15b
 

En vedette (16)

Karnaugh Mapping Explained
Karnaugh Mapping ExplainedKarnaugh Mapping Explained
Karnaugh Mapping Explained
 
Logic simplification sop and pos forms
Logic simplification sop and pos formsLogic simplification sop and pos forms
Logic simplification sop and pos forms
 
Kmap Slideshare
Kmap SlideshareKmap Slideshare
Kmap Slideshare
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Mapas de Karnaugh (introdução, até 4 variáveis)
Mapas de Karnaugh (introdução, até 4 variáveis)Mapas de Karnaugh (introdução, até 4 variáveis)
Mapas de Karnaugh (introdução, até 4 variáveis)
 
Minterms & maxterms
Minterms & maxtermsMinterms & maxterms
Minterms & maxterms
 
Karnaugh Maps
Karnaugh MapsKarnaugh Maps
Karnaugh Maps
 
Karnaugh Map
Karnaugh MapKarnaugh Map
Karnaugh Map
 
Basics of K map
Basics of K mapBasics of K map
Basics of K map
 
Kmap
KmapKmap
Kmap
 
Boolean algebra And Logic Gates
Boolean algebra And Logic GatesBoolean algebra And Logic Gates
Boolean algebra And Logic Gates
 
Cmos
CmosCmos
Cmos
 
Low Cost Housing Concept
Low Cost Housing ConceptLow Cost Housing Concept
Low Cost Housing Concept
 
Ch4 Boolean Algebra And Logic Simplication1
Ch4 Boolean Algebra And Logic Simplication1Ch4 Boolean Algebra And Logic Simplication1
Ch4 Boolean Algebra And Logic Simplication1
 
Low cost housing India
Low cost housing IndiaLow cost housing India
Low cost housing India
 
low cost construction
low cost constructionlow cost construction
low cost construction
 

Similaire à Karnaugh maps (20)

3,EEng k-map.pdf
3,EEng k-map.pdf3,EEng k-map.pdf
3,EEng k-map.pdf
 
kmaps
 kmaps kmaps
kmaps
 
Minimizing boolean
Minimizing booleanMinimizing boolean
Minimizing boolean
 
Minimizing boolean
Minimizing booleanMinimizing boolean
Minimizing boolean
 
9402730.ppt
9402730.ppt9402730.ppt
9402730.ppt
 
Karnaugh maps z 88
Karnaugh maps   z  88Karnaugh maps   z  88
Karnaugh maps z 88
 
Karnaugh maps
Karnaugh mapsKarnaugh maps
Karnaugh maps
 
Chapter-3.ppt
Chapter-3.pptChapter-3.ppt
Chapter-3.ppt
 
Logic design basics
Logic design basicsLogic design basics
Logic design basics
 
kmap.pptx
kmap.pptxkmap.pptx
kmap.pptx
 
Chapter-3.pdf
Chapter-3.pdfChapter-3.pdf
Chapter-3.pdf
 
Chapter-3.pdf
Chapter-3.pdfChapter-3.pdf
Chapter-3.pdf
 
1سلمي 2
1سلمي 21سلمي 2
1سلمي 2
 
Electromagnetic theory Chapter 1
Electromagnetic theory Chapter 1Electromagnetic theory Chapter 1
Electromagnetic theory Chapter 1
 
1533 game mathematics
1533 game mathematics1533 game mathematics
1533 game mathematics
 
EE8351 DLC
EE8351 DLCEE8351 DLC
EE8351 DLC
 
Relatório
RelatórioRelatório
Relatório
 
Vectors and 3 d
Vectors and 3 dVectors and 3 d
Vectors and 3 d
 
Teoria y problemas de funciones cuadraticas fc324 ccesa007
Teoria y problemas de funciones cuadraticas  fc324  ccesa007Teoria y problemas de funciones cuadraticas  fc324  ccesa007
Teoria y problemas de funciones cuadraticas fc324 ccesa007
 
1560 mathematics for economists
1560 mathematics for economists1560 mathematics for economists
1560 mathematics for economists
 

Plus de AJAL A J

KEAM KERALA ENTRANCE EXAM
KEAM KERALA ENTRANCE EXAMKEAM KERALA ENTRANCE EXAM
KEAM KERALA ENTRANCE EXAMAJAL A J
 
Paleontology Career
Paleontology  CareerPaleontology  Career
Paleontology CareerAJAL A J
 
CHEMISTRY basic concepts of chemistry
CHEMISTRY  basic concepts of chemistryCHEMISTRY  basic concepts of chemistry
CHEMISTRY basic concepts of chemistryAJAL A J
 
Biogeochemical cycles
Biogeochemical cyclesBiogeochemical cycles
Biogeochemical cyclesAJAL A J
 
ac dc bridges
ac dc bridgesac dc bridges
ac dc bridgesAJAL A J
 
Hays bridge schering bridge wien bridge
Hays bridge  schering bridge  wien bridgeHays bridge  schering bridge  wien bridge
Hays bridge schering bridge wien bridgeAJAL A J
 
App Naming Tip
App Naming TipApp Naming Tip
App Naming Tip AJAL A J
 
flora and fauna of himachal pradesh and kerala
flora and fauna of himachal pradesh and keralaflora and fauna of himachal pradesh and kerala
flora and fauna of himachal pradesh and keralaAJAL A J
 
B.Sc Cardiovascular Technology(CVT)
 B.Sc Cardiovascular Technology(CVT)  B.Sc Cardiovascular Technology(CVT)
B.Sc Cardiovascular Technology(CVT) AJAL A J
 
11 business strategies to make profit
11 business strategies to make profit 11 business strategies to make profit
11 business strategies to make profit AJAL A J
 
PCOS Polycystic Ovary Syndrome
PCOS  Polycystic Ovary SyndromePCOS  Polycystic Ovary Syndrome
PCOS Polycystic Ovary SyndromeAJAL A J
 
Courses and Career Options after Class 12 in Humanities
Courses and Career Options after Class 12 in HumanitiesCourses and Career Options after Class 12 in Humanities
Courses and Career Options after Class 12 in HumanitiesAJAL A J
 
MANAGEMENT Stories
 MANAGEMENT Stories MANAGEMENT Stories
MANAGEMENT StoriesAJAL A J
 
NEET PREPRATION TIPS AND STRATEGY
NEET PREPRATION TIPS AND STRATEGYNEET PREPRATION TIPS AND STRATEGY
NEET PREPRATION TIPS AND STRATEGYAJAL A J
 
REVOLUTIONS IN AGRICULTURE
REVOLUTIONS IN AGRICULTUREREVOLUTIONS IN AGRICULTURE
REVOLUTIONS IN AGRICULTUREAJAL A J
 
NRI QUOTA IN NIT'S
NRI QUOTA IN NIT'S NRI QUOTA IN NIT'S
NRI QUOTA IN NIT'S AJAL A J
 
Subjects to study if you want to work for a charity
Subjects to study if you want to work for a charitySubjects to study if you want to work for a charity
Subjects to study if you want to work for a charityAJAL A J
 
IIT JEE A KERALA PERSPECTIVE
IIT JEE A KERALA PERSPECTIVE IIT JEE A KERALA PERSPECTIVE
IIT JEE A KERALA PERSPECTIVE AJAL A J
 
Clat 2020 exam COMPLETE DETAILS
Clat 2020 exam COMPLETE DETAILSClat 2020 exam COMPLETE DETAILS
Clat 2020 exam COMPLETE DETAILSAJAL A J
 

Plus de AJAL A J (20)

KEAM KERALA ENTRANCE EXAM
KEAM KERALA ENTRANCE EXAMKEAM KERALA ENTRANCE EXAM
KEAM KERALA ENTRANCE EXAM
 
Paleontology Career
Paleontology  CareerPaleontology  Career
Paleontology Career
 
CHEMISTRY basic concepts of chemistry
CHEMISTRY  basic concepts of chemistryCHEMISTRY  basic concepts of chemistry
CHEMISTRY basic concepts of chemistry
 
Ecology
EcologyEcology
Ecology
 
Biogeochemical cycles
Biogeochemical cyclesBiogeochemical cycles
Biogeochemical cycles
 
ac dc bridges
ac dc bridgesac dc bridges
ac dc bridges
 
Hays bridge schering bridge wien bridge
Hays bridge  schering bridge  wien bridgeHays bridge  schering bridge  wien bridge
Hays bridge schering bridge wien bridge
 
App Naming Tip
App Naming TipApp Naming Tip
App Naming Tip
 
flora and fauna of himachal pradesh and kerala
flora and fauna of himachal pradesh and keralaflora and fauna of himachal pradesh and kerala
flora and fauna of himachal pradesh and kerala
 
B.Sc Cardiovascular Technology(CVT)
 B.Sc Cardiovascular Technology(CVT)  B.Sc Cardiovascular Technology(CVT)
B.Sc Cardiovascular Technology(CVT)
 
11 business strategies to make profit
11 business strategies to make profit 11 business strategies to make profit
11 business strategies to make profit
 
PCOS Polycystic Ovary Syndrome
PCOS  Polycystic Ovary SyndromePCOS  Polycystic Ovary Syndrome
PCOS Polycystic Ovary Syndrome
 
Courses and Career Options after Class 12 in Humanities
Courses and Career Options after Class 12 in HumanitiesCourses and Career Options after Class 12 in Humanities
Courses and Career Options after Class 12 in Humanities
 
MANAGEMENT Stories
 MANAGEMENT Stories MANAGEMENT Stories
MANAGEMENT Stories
 
NEET PREPRATION TIPS AND STRATEGY
NEET PREPRATION TIPS AND STRATEGYNEET PREPRATION TIPS AND STRATEGY
NEET PREPRATION TIPS AND STRATEGY
 
REVOLUTIONS IN AGRICULTURE
REVOLUTIONS IN AGRICULTUREREVOLUTIONS IN AGRICULTURE
REVOLUTIONS IN AGRICULTURE
 
NRI QUOTA IN NIT'S
NRI QUOTA IN NIT'S NRI QUOTA IN NIT'S
NRI QUOTA IN NIT'S
 
Subjects to study if you want to work for a charity
Subjects to study if you want to work for a charitySubjects to study if you want to work for a charity
Subjects to study if you want to work for a charity
 
IIT JEE A KERALA PERSPECTIVE
IIT JEE A KERALA PERSPECTIVE IIT JEE A KERALA PERSPECTIVE
IIT JEE A KERALA PERSPECTIVE
 
Clat 2020 exam COMPLETE DETAILS
Clat 2020 exam COMPLETE DETAILSClat 2020 exam COMPLETE DETAILS
Clat 2020 exam COMPLETE DETAILS
 

Dernier

the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...ranjana rawat
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Dernier (20)

the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 

Karnaugh maps

  • 1. Karnaugh Maps -- A tool for representing Boolean functions
  • 2. We can come close to our aim by using a graphical notation named Karnaugh Map that will be defined in next slides
  • 3. Karnaugh Map Technique • A K-Map is simply a folded truth table, where physical adjacency implies logical adjacency • K-Maps are most commonly used hand method for logic minimization. • K-Maps are a graphical technique used to simplify a logic equation. • K-Maps are procedural and much cleaner than Boolean simplification. • K-Maps can be used for any number of input variables, BUT are only practical for two, three, and four variables. 3
  • 4. Terminology •Implicant : Product term that implies function • Prime Implicant : An Implicant that is not completely covered by any other Implicant but itself • Essential prime Implicant : A prime Implicant that has a minter not covered by any other prime Implicant • Product term : An and expression 4 Terms
  • 5. Terminology •Minterm : We define a Minterm to be a product that contains all variables of that particular switching function in either complemented or non-complemented form • Maxterm : We define a Maxterm to be a sum that contains all variables of that particular switching function in either complemented or non-complemented form •Standard SOP(Sum Of Products) : In standard SOP, the products are obtained directly from the Karnaugh map or truth table, so the SOP contains all of the variables of the function •Standard POS(Product Of Sums) : In standard POS, the products are obtained directly from the Karnaugh map or truth table, so the POS contains all of the variables of the function 5 Terms
  • 6. 6 minterm ID A B f(A,B) minterm 0 0 0 0 1 0 1 1 A’B 2 1 0 1 AB’ 3 1 1 1 AB An example of 2-variable function f(A,B)=A+B
  • 7. Simplification Goals • Goal -- minimize the cost of realizing a switching function • Cost measures and other considerations – Number of gates – Number of levels – Interconnection complexity – Preventing hazards • Two-level realizations – Minimize the number of gates (terms in switching function)
  • 8. Minimization of Boolean expressions • The minimization will result in reduction of the number of gates (resulting from less number of terms) and the number of inputs per gate (resulting from less number of variables per term) • The minimization will reduce cost, efficiency and power consumption. •y(x+x`)=y.1=y •y+xx`=y+0=y •(x`y+xy`)=x⊕y •(x`y`+xy)=(x⊕y)`
  • 9. Karnaugh Maps • Boolean algebra helps us simplify expressions and circuits • Karnaugh Map: A graphical technique for simplifying a Boolean expression into either form: – sum of products (SOP) – product of sums (POS) • Goal of the simplification. – There are a minimal number of product/sum terms – Each term has a minimal number of literals • Circuit-wise, this leads to a minimal two-level implementation
  • 10. Minimum SOP • f= (xyz +x`yz+ xy`z+ …..) Is called sum of products. The + is sum operator which is an OR gate. The product such as xy is an AND gate for the two inputs x and y.
  • 11. Examples • Two variable K-map f(A,B)=∑m(0,1,3)=A`B`+A`B+AB 1 0 1 1 A 0 1 B01
  • 12. V 0 0 0 0 B A A Groups of One – 4 Two Variable K-Map Groupings BA 1 BA 1 1 A B BA 1 B 12
  • 13. V 0 0 0 0 B A A Groups of Two – 4 Two Variable K-Map Groupings B A 1 1 A 1 1 1 B 1 1 B 1 13
  • 14. V 1 1 1 1 B A A Group of Four – 1 Two Variable K-Map Groupings 1 B 14
  • 15. Three Variable K-Map Groupings V 0 0 0 0 0 0 0 0 C C BA BA BA BA BA 1 1 BA 1 1 BA 1 1 BA 1 1 1 CA 1 1 CA 1 1 CA 1 1 CB 1 1 CB 1 1 CA 11 CB 1 1 CB 1 Groups of One – 8 (not shown) Groups of Two – 12 15
  • 16. Groups of Four – 6 Three Variable K-Map Groupings V 0 0 0 0 0 0 0 0 C C BA BA BA BA 1 C 1 1 1 1 C 1 1 1 A 1 1 1 1 B 1 1 1 1 A 1 1 1 1 B 1 1 1 1 16
  • 17. Group of Eight - 1 Three Variable K-Map Groupings V 1 1 1 1 1 1 1 1 C C BA BA BA BA 1 17
  • 18. Three variable map • f(A,B,C) = ∑m(0,3,5)= A`B`C`+A`BC+AB`C 1 1 A`BC 1 AB`C A`B` 0 0 A`B 0 1 A B 1 1 A B` 1 0 C` 0 C 1 A`B`C`
  • 19. 19 minterm ID A B f(A,B) minterm 0 0 0 0 1 0 1 1 A’B 2 1 0 1 AB’ 3 1 1 1 AB An example of 2-variable function f(A,B)=A+B
  • 20. 20 Function can be represented by sum of minterms: f(A,B) = A’B+AB’+AB This is not minimal however! We want to minimize the number of literals and terms. We factor out common terms – A’B+AB’+AB= A’B+AB’+AB+AB =(A’+A)B+A(B’+B)=B+A Hence, we have f(A,B) = A+B
  • 21. 21 K-Map: Truth Table in 2 Dimensions A = 0 A = 1 B = 0 B = 1 0 2 1 3 0 1 1 1 A’B AB’ AB f(A,B) = A + B
  • 22. 22 ID A B f(A,B) minterm 0 0 0 0 1 0 1 1 A’B 2 1 0 0 3 1 1 1 AB Another Example f(A,B)=B f(A,B)=A’B+AB=(A’+A)B=B
  • 23. 23 On the K-map: A = 0 A= 1 B= 0 B = 1 0 2 1 3 0 0 1 1 A’B AB f(A,B)=B
  • 24. 24 ID A B f(A,B) Maxterm 0 0 0 0 A+B 1 0 1 1 2 1 0 0 A’+B 3 1 1 1 Using Maxterms f(A,B)=(A+B)(A’+B)=(AA’)+B=0+B=B
  • 25. Maxterm example f(A,B,C) = ∏M(1,2,4,6,7) =(A+B+C`)(A+B`+C)(A`+B+C) )(A`+B`+C) (A`+B`+C`) Note that the complements are (0,3,5) which are the minterms of the previous example 0 0 0 0 0 A`B` A`B AB AB` C` C (A+B) (A+B`) (A`+B`) (A`+B) C C`
  • 26. Re-arranging the Truth Table • A two-variable function has four possible minterms. We can re-arrange these minterms into a Karnaugh map • Now we can easily see which minterms contain common literals – Minterms on the left and right sides contain y’ and y respectively – Minterms in the top and bottom rows contain x’ and x respectively x y minterm 0 0 x’y’ 0 1 x’y 1 0 xy’ 1 1 xy Y 0 1 0 x’y’ x’y X 1 xy’ xy Y 0 1 0 x’y’ x’y X 1 xy’ xy Y’ Y X’ x’y’ x’y X xy’ xy
  • 27. Karnaugh Map Simplifications • Imagine a two-variable sum of minterms: x’y’ + x’y • Both of these minterms appear in the top row of a Karnaugh map, which means that they both contain the literal x’ • What happens if you simplify this expression using Boolean algebra? x’y’ + x’y = x’(y’ + y) [ Distributive ] = x’ • 1 [ y + y’ = 1 ] = x’ [ x • 1 = x ] Y x’y’ x’y X xy’ xy
  • 28. More Two-Variable Examples • Another example expression is x’y + xy – Both minterms appear in the right side, where y is uncomplemented – Thus, we can reduce x’y + xy to just y • How about x’y’ + x’y + xy? – We have x’y’ + x’y in the top row, corresponding to x’ – There’s also x’y + xy in the right side, corresponding to y – This whole expression can be reduced to x’ + y Y x’y’ x’y X xy’ xy Y x’y’ x’y X xy’ xy
  • 29. A Three-Variable Karnaugh Map • For a three-variable expression with inputs x, y, z, the arrangement of minterms is more tricky: YZ 00 01 11 10 0 x’y’z’ x’y’z x’yz x’yz’ X 1 xy’z’ xy’z xyz xyz’ YZ 00 01 11 10 0 m0 m1 m3 m2 X 1 m4 m5 m7 m6
  • 30. Terminology ( cont. ) 30 0 0 0 1 1 1 0 1 0 01 11 10 0 1 Karnaugh Map 1 3 2 4 5 7 6 0 AB C
  • 31. Figure K-map illustrating implicants 1 C A B 0 0 0 1 1 1 1 0 0 2 6 4 3 7 5 0 1 B 1 1 1 1 1 A C Minterms: {A′B′ C, A′ BC′, A′ BC, ABC′, ABC} Groups of two minterms: {A′ B, AB, A′ C, BC′, BC} Groups of four minterms: {B} Prime implicants: {A′ C, B} Cover = {A′ C, B} MSOP = A′ C + B
  • 32. Generating and Selecting Prime Implicants 1. Count the number of adjacencies for each minterm on the K-map. 2. Select an uncovered minterm with the fewest number of adjacencies. Make an arbitrary choice if more than one choice is possible. 3. Generate a prime implicant for this minterm and put it in the cover. If this minterm is covered by more than one prime implicant, select the one that covers the most uncovered minterms. 4. Repeat steps 2 and 3 until all minterms have been covered.
  • 33. Generating and Selecting Prime Implicants (Revisited) 1. Circle all prime implicants on the K-map. 2. Identify and select all essential prime implicants for the cover. 3. Select a minimum subset of the remaining prime implicants to complete the cover, that is, to cover those minterms not covered by the essential prime implicants.
  • 34. Example f(a,b,c,d) = ∑m(3,7,11,12,13,14,15) =a`b`cd + a`bcd + ab`cd + abc`d`+ abc`d + abcd` + abcd =cd(a`b` + a`b + ab`) + ab(c`d` + c`d + cd` + cd ) =cd(a`[b` + b] + ab`) + ab(c`[d` + d] + c[d` + d]) =cd(a`[1] + ab`) + ab(c`[1] + c[1]) =ab+ab`cd + a`cd =ab+cd(ab` + a`) =ab+ cd(a + a`)(a`+b`) = ab + a`cd + b`cd = ab +cd(a` + b`)
  • 35. f(A,B,C,D) = ∑m(1,2,3,6) = A′C + BC′ 1 C A B 0 0 0 1 1 1 1 0 0 2 6 4 3 7 5 0 1 B 1 1 1 1 A C
  • 36. Proper ordering ? • With this ordering, any group of 2, 4 or 8 adjacent squares on the map contains common literals that can be factored out • “Adjacency” includes wrapping around the left and right sides: • We’ll use this property of adjacent squares to do our simplifications. x’y’z + x’yz = x’z(y’ + y) = x’z • 1 = x’z x’y’z’ + xy’z’ + x’yz’ + xyz’ = z’(x’y’ + xy’ + x’y + xy) = z’(y’(x’ + x) + y(x’ + x)) = z’(y’+y) = z’ Y x’y’z’ x’y’z x’yz x’yz’ X xy’z’ xy’z xyz xyz’ Z Y x’y’z’ x’y’z x’yz x’yz’ X xy’z’ xy’z xyz xyz’ Z
  • 37. Three-Variable K-Maps ∑ == CB(0,4)f ∑ == BA(4,5)f ∑ == B(0,1,4,5)f ∑ == A(0,1,2,3)f BC 00 0 01 1 11 10A 1 0 0 0 1 0 0 0 BC 00 0 01 1 11 10A 0 0 0 0 1 1 0 0 BC 00 0 01 1 11 10A 1 1 1 1 0 0 0 0 BC 00 0 01 1 11 10A 1 1 0 0 1 1 0 0 ∑ == CA(0,4)f ∑ == CA(4,6)f ∑ == CA(0,2)f ∑ == C(0,2,4,6)f BC 00 0 01 1 11 10A 0 1 1 0 0 0 0 0 BC 00 0 01 1 11 10A 0 0 0 0 1 0 0 1 BC 00 0 01 1 11 10A 1 0 0 1 1 0 0 1 BC 00 0 01 1 11 10A 1 0 0 1 0 0 0 0
  • 38. Four Variable K-Map Groupings V 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BA BA BA BA DC DC DC DC Groups of One – 16 (not shown) Groups of Two – 32 (not shown) Groups of Four – 24 (seven shown) CB 1 1 1 1 DB 1 1 1 1 DA 1 1 1 1 CB 1 1 1 1 DB 1 1 1 1 DA 1 1 1 1 DB11 11 38
  • 39. Four Variable K-Map Groupings V 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BA BA BA BA DC DC DC DC Groups of Eight – 8 (two shown) B 1 1 1 1 1 1 1 1 D 1 1 1 1 1 1 1 1 39
  • 40. Four Variable K-Map Groupings V 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 BA BA BA BA DC DC DC DC Group of Sixteen – 1 1 40
  • 41. Four-Variable K-Maps ∑ ••== DCB(0,8)f ∑ ••== DCB(5,13)f ∑ ••== DBA(13,15)f ∑ ••== DBA(4,6)f ∑ •== CA(2,3,6,7)f ∑ •== DB)(4,6,12,14f ∑ •== CB)(2,3,10,11f ∑ •== DB(0,2,8,10)f CD 00 00 01 01 11 11 10 10 AB 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 CD 00 00 01 01 11 11 10 10 AB 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 CD 00 00 01 01 11 11 10 10 AB 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 CD 00 00 01 01 11 11 10 10 AB 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 CD 00 00 01 01 11 11 10 10 AB 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 CD 00 00 01 01 11 11 10 10 AB 0 0 0 0 1 0 0 1 1 0 0 1 0 0 0 0 CD 00 00 01 01 11 11 10 10 AB 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1 CD 00 00 01 01 11 11 10 10 AB 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1
  • 42. Four-Variable K-Maps CD 00 00 01 01 11 11 10 10 AB 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 CD 00 00 01 01 11 11 10 10 AB 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 CD 00 00 01 01 11 11 10 10 AB 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 CD 00 00 01 01 11 11 10 10 AB 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 CD 00 00 01 01 11 11 10 10 AB 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 CD 00 00 01 01 11 11 10 10 AB 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 CD 00 00 01 01 11 11 10 10 AB 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 CD 00 00 01 01 11 11 10 10 AB 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 f (4,5,6,7) A B= = •∑ f (3,7,11,15) C D= = •∑ f (0,3,5,6,9,10,12,15)= ∑ f (1,2,4,7,8,11,13,14)= ∑ f A B C D= ⊗ ⊗ ⊗ f A B C D= ⊕ ⊕ ⊕ f (1,3,5,7,9,11,13,15)= ∑ f (0,2,4,6,8,10,12,14)= ∑ f (4,5,6,7,12,13,14,15)= ∑ f (0,1,2,3,8,9,10,11)= ∑ f D= f D= f B= f B=
  • 43. • 4 Variable Maps – f(A,B,C,D) = Σm(0,1,2,3,6,8,9,11,13,14) – f = A C' D + B C D' + B' C ' + B' D + A'B' C D A B 00 01 11 10 00 1 1 1 1 01 0 0 0 1 11 0 1 0 1 10 1 1 1 0
  • 44. • Another 4 Variable Map – f(A,B,C,D) = Σm(0,1,2,5,6,7,8,9,10,13,15) C D A B 00 01 11 10 00 1 1 0 1 01 0 1 1 1 11 0 1 1 0 10 1 1 0 1 These are not essential!
  • 45. For the Simplest Result • Make as few rectangles as possible, to minimize the number of products in the final expression. • Make each rectangle as large as possible, to minimize the number of literals in each term. • Rectangles can be overlapped, if that makes them larger.
  • 46. K-map Simplification @ SoP Expressions • Let’s consider simplifying f(x,y,z) = xy + y’z + xz • You should convert the expression into a sum of minterms form, – The easiest way to do this is to make a truth table for the function, and then read off the minterms – You can either write out the literals or use the minterm shorthand • Here is the truth table and sum of minterms for our example: 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 0 1 0 1 1 1 1 0 1 1 1 1 1 f(x,y,z) = x’y’z + xy’z + xyz’+ xyz = m1 + m5 + m6 + m7
  • 47. Unsimplifying Expressions • You can also convert the expression to a sum of minterms with Boolean algebra – Apply the distributive law in reverse to add in missing variables. – Very few people actually do this, but it’s occasionally useful. • In both cases, we’re actually “unsimplifying” our example expression – The resulting expression is larger than the original one! – But having all the individual minterms makes it easy to combine them together with the K-map xy + y’z + xz = (xy • 1) + (y’z • 1) + (xz • 1) = (xy • (z’ + z)) + (y’z • (x’ + x)) + (xz • (y’ + y)) = (xyz’ + xyz) + (x’y’z + xy’z) + (xy’z + xyz) = xyz’ + xyz + x’y’z + xy’z = m1 + m5 + m6 + m7
  • 48. Minimum product of sums (POS) • The minimum product of sums (POS) of a function, f, is a POS representation of f that contains the fewest number of sum terms and the fewest number of literals of any POS representation of f. • The zeros are considered exactly the same as ones in the case of sum of product (SOP)
  • 49. Example f(a,b,c,d) = ∏M(0,1,2,4,5,6,8,9,10) =∑m(3,7,11,12,13,14,15) = [(a+b+c+d)(a+b+c+d`)(a+b`+c`+d`) (a`+b+c`+d`)(a`+b`+c+ d)(a`+b`+c+ d`) (a`+b`+c`+d)(a`+b`+c`+d`)]
  • 50. PoS Optimization • Maxterms are grouped to find minimal PoS expression x +y+z x+y+z’ x+y’+z’ x+y’+z x’ +y+z x’+y+z’ x’+y’+z’ x’+y’+z 00 01 11 10 0 1 x yz
  • 51. PoS Optimization • F(W,X,Y,Z)= ∏ M(0,1,2,4,5) x +y+z x+y+z’ x+y’+z’ x+y’+z x’ +y+z x’+y+z’ x’+y’+z’ x’+y’+z 00 01 11 10 0 1 x yz 0 0 1 0 0 0 1 1 00 01 11 10 0 1 x yz F(W,X,Y,Z)= Y . (X + Z)
  • 52. Terminology ( cont. ) •Sometimes writing an expression in a POS form is easier as seen in the following example: 0 1 1 0 1 1 1 1 00 01 11 10 0 1 Karnaugh Map 1 3 2 5 7 64 0 AB C 52
  • 53. • POS Minimization – K-maps can be used for POS minimization, too – f(A,B,C) = Σm(2,3,6) • Minimum POS is f = (B)(A' + C') cost = 2 + 4 = 6 • Minimum SOP is f = A'B + BC' cost = 3 + 6 = 9 B C A 00 01 11 10 0 0 0 1 1 1 0 0 0 1
  • 54. I don’t care! • You don’t always need all 2n input combinations in an n-variable function – If you can guarantee that certain input combinations never occur – If some outputs aren’t used in the rest of the circuit • We mark don’t-care outputs in truth tables and K-maps with Xs. x y z f(x,y,z) 0 0 0 0 0 0 1 1 0 1 0 X 0 1 1 0 1 0 0 0 1 0 1 1 1 1 0 X 1 1 1 1
  • 55. – Many times there are incompletely specified conditions • Valuations that can never occur, or for which we “don’t care what the device does” – Modeling such a device requires us to specify don’t care conditions in those instances • Use X as a value to indicate we don't care what happens – Don't care situations are often called incompletely specified functions Don’t Care Conditions
  • 56. • Example Using Don't Cares – f(A,B,C,D) = Σm(1,5,8,9,10) + d(3,7,11,15) – f = A B' + A' D C D A B 00 01 11 10 00 0 1 X 0 01 0 1 X 0 11 0 0 X 0 10 1 1 X 1
  • 57. 1. Choose an element from the “on” set 2. Find all maximal groups (prime implicants) of “on” elements and X elements adjacent to that element  Note 1: prime implicants are always a power of 2 in size  Note 2: do not feel compelled to include X’s – use them only when they provide a larger implicant 3. Repeat steps 1-2 for all elements in the “on” set 4. Select all essential prime implicants 5. For all elements of the “on” set not covered by the essential prime implicants, select the smallest number of prime implicants that cover them Karnaugh Map Method Restated
  • 58. K-map Summary • K-maps are an alternative to algebra for simplifying expressions – The result is a MSP/MPS, which leads to a minimal two-level circuit – It’s easy to handle don’t-care conditions – K-maps are really only good for manual simplification of small expressions... • Things to keep in mind: – Remember the correct order of minterms/maxterms on the K-map – When grouping, you can wrap around all sides of the K-map, and your groups can overlap – Make as few rectangles as possible, but make each of them as large as possible. This leads to fewer, but simpler, product terms – There may be more than one valid solution
  • 59. Timing Hazards in Combinational Logic Circuits • Hazards are undesirable changes in the output of a combinational logic circuit caused by unequal gate propagation delays. • Static hazard (glitch) -- the output momentarily changes from the correct or static state – Static 1 hazard -- the output changes from 1 to 0 and back to 1 – Static 0 hazard -- the output changes from 0 to 1 and back to 0 • Dynamic hazard (bounce) -- the output changes multiple times during a change of state – Dynamic 0 to 1 hazard -- the output changes from 0 to 1 to 0 to 1 – Dynamic 1 to 0 hazard -- the output changes from 1 to 0 to 1 to 0
  • 60. Illustration of a static hazard. x 1 x 2 x 3 x 1 y 1 y 2 G 1 G 2 G 3I 1 z ( x 1 , x 2 , x 3 ) ( a ) ( b ) x 1 x 2 x 3 y 1 y 2 G 1 G 2 G 3 z ( x 1 , x 2 , x 3 ) x 1
  • 61. Illustration of a static hazard (con’t) x 1 x 2 x 3 y 1 y 2 z T i m e ( c ) t 1 t 2 t 3 t 4 t 5 t 6 D t D t D t
  • 62. Illustration of a static hazard (con’t). x 1 x 2 x 3 y 1 y 2 z T i m e ( d ) t 1 t 2 t 3 t 4 t 5 t 6 t 7 t 8 t 9 D t 2 D t 3 D t 1 D t 3 D t 2 D t 3
  • 63. Identifying hazards on a K-map. ( b ) 1 11 1 x 1 x 2 x 3 z ( a ) 1 11 1 x 1 x 2 x 3 z
  • 64. Hazard-free network. x 1 x 2 x 3 G 1 G 4 G 3 z ( x 1 , x 2 , x 3 ) x 3 G 2 x 1 x 2
  • 65. Example of a static-0 hazard. G 1 G 3 G 4 z ( A , B , C , D ) G 2 0 B D 0 0 0 0 0 0 0 0 C A ( a ) ( b ) A C A D B A C
  • 66. Example of a static-0 hazard (con’t). 0 B D 0 0 0 0 0 0 0 0 C A G 1 G 4 z ( A , B , C , D ) G 2 G 3 ( c ) ( d ) A C A D B A C C B D G 5
  • 68. Quine-McCluskey Minimization Method • Advantages over K-maps – Can be computerized – Can handle functions of more than six variables • Overview of the method – Given the minterms of a function – Find all prime implicants (steps 1 and 2) • Partition minterms into groups according to the number of 1’s • Exhaustively search for prime implicants – Find a minimum prime implicant cover (steps 3 and 4) • Construct a prime implicant chart • Select the minimum number of prime implicants
  • 69. Use the Q-M method to find the MSOP of the function f(A,B,C,D) = ∏m(2,4,6,8,9,10,12,13,15) C D A B 1 0 0 0 1 1 1 1 0 0 4 1 2 8 1 5 1 3 9 3 7 1 5 1 1 2 6 1 4 1 0 0 0 0 1 1 1 1 0 B D 1 1 1 1 1 1 A C 1 1 Figure K-map for example 3.30.
  • 71. Step 2 -- Generate Prime Implicants
  • 72. Step 3 -- Prime Implicant Chart 642 8 1 0 1 2 1 3 1 5 × ⊗ √ P I 2 P I 3 P I 4 P I 5 P I 6 * * P I 7 * * P I 1 × × × × × × × × × × × × × 9 √ √ √ √ ⊗
  • 73. Step 4 -- Reduced Prime Implicant Chart 642 1 0 × √ P I 2 * P I 3 * P I 4 P I 5 P I 6 × × × √√ √ × × × ×
  • 74. The Resulting Minimal Realization of f f(A,B,C,D) = PI1 + PI3 + PI4 + PI7 = 1-0- + -010 + 01-0 + 11-1 = AC′ + B′ CD′ + A′ BD′ + ABD
  • 75. How the Q-M Results Look on a K-map C D A B 0 0 0 1 1 1 1 0 0 4 1 2 8 1 5 1 3 9 3 7 1 5 1 1 2 6 1 4 1 0 0 0 0 1 1 1 1 0 B 1 A C 1 1 1 D 1 1 1 1 1 Figure 3.33 Grouping of terms.
  • 76. Covering Procedure Step 1 -- Identify any minterms covered by only one PI. Select these PIs for the cover. Step 2 -- Remove rows covered by the PIs identified in step 1. Remove minterms covered by the removed rows. Step 3 -- If a cyclic chart results from step 2, go to step 5. Otherwise, apply the reduction procedure of steps 1 and 2. Step 4 -- If a cyclic chart results from step 3, go to step 5. Otherwise return to step 1. Step 5 -- Apply the cyclic chart procedure. Repeat step 5 until a void chart or noncyclic chart chart is produced. In the latter case, return to step 1.
  • 77. Coverage Example f(A,B,C,D) = ∑m(0,1,5,6,7,8,9,10,11,13,14,15) 510 6 8 9 1 0 1 1 × ⊗ √ * * P I 1 P I 2 P I 3 P I 4 P I 5 P I 6 * * P I 7 × × × × × × × × 7 √ √ √ √ √ 1 3 1 4 1 5 √ √ ⊗ × × × × × × × × × × × × × × × × ×
  • 78. Reduced PI Charts 1 11 05 1 3 × P I 2 P I 3 P I 4 P I 5 P I 6 × × × × × × × × × × √ √ × 1 05 * P I 2 * P I 4
  • 79. Cyclic PI Charts 1. No essential PIs. 2. No row or column coverage. 321 4 × * P I 1 P I 2 P I 3 P I 4 P I 5 P I 6 × × √√ × × × 5 6 ×× × × ×× 542 6 × P I 2 P I 3 P I 4 P I 5 P I 6 × × × × × × × 542 6 × √ * P I 3 P I 4 * P I 5 × √√ √ × × × ×
  • 80. Using the Q-M Procedure with Incompletely Specified Functions 1. Use minterms and don’t cares when generating prime implicants 2. Use only minterms when finding a minimal cover Example 3.25 -- Find a minimal sum of products of the following function using the Quine-McCluskey procedure.
  • 82. PI Chart 732 1 0 1 5 2 7 ⊗ √ P I 1 P I 2 P I 3 × × 1 2 √ √ √ √ √ ⊗ × × * * P I 4 * * P I 5 * * P I 6 * * P I 7 ⊗ ⊗ × × ×
  • 83. Results of Minimization f(A,B,C,D,E) = PI1 + PI4 + PI5 + PI6 + PI7 OR = PI2 + PI4 + PI5 + PI6 + PI7
  • 84.
  • 85. Half Adder 85 Half Adder (1/2)  Half-Adder is a circuit which adds two single bits (called X,Y) together, to produce a result of two bits (called C, S).  A black-box representation of this circuit is: Truth table representation is: X Y C S 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0 Half adder X Y (X+Y) S C
  • 86. Half Adder 86 Half Adder (2/2)  In sum-of-minterms forms: C = X.Y S = X'.Y + X.Y'  Algebraic simplification could simplify S to: S = X'.Y + X.Y' = X⊕Y  Giving: X Y C S 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0 X Y S C

Notes de l'éditeur

  1. Explain what K-Maps are, why we use them, and the advantages of using K-Maps over Boolean algebra.
  2. Two variable K-Map, groups of one.
  3. Two variable K-Map, groups of two.
  4. Two variable K-Map, group of four.
  5. Three Variable K-Map: 8 groups of one are not shown because they are obvious. 12 groups of two; all are shown.
  6. Three Variable K-Map: 6 groups of four; all are shown.
  7. Three Variable K-Map, Group of Eight.
  8. Four Variable K-Map: There are 16 groups of one that are not shown because they are obvious. There are 32 groups of two that are not shown because they are obvious. There are 24 groups of four. Seven are show, the other 17 are obvious.
  9. Four variable K-Map: There are 8 groups of eight. Two are shown, the other 6 are obvious.
  10. Four variable K-Map, group of 16.