Anda di halaman 1dari 3

Lecture 6 The WHY slide

Logistics Karnaugh map (K-map)


TA Office Hour today 3:30 in EEB 003 A visualization tool for logic simplification. It is a flattened
Monday holiday version of Boolean cube that allows you to solve even difficult
and complex Boolean expression into the minimized form. A
Last lecture convenient tool for you to know for up to 6 input variable
NAND and NOR and pushing bubbles expressions (e.g. X = f(A, B, C, D, E, F))
Logic simplification: Visualization techniques
Boolean cubes Dont cares
Sometimes the logic output doesnt matter. When we dont
Todays lecture care if the output is 0 or 1, rather than assigning random
Logic simplification: Visualization techniques outputs, it is best to denote it as Dont care. If you learn
Karnaugh maps (K-maps)
how to use the dont cares, you will be able to build even
K-maps with dont cares
more efficient circuits than without them.

CSE370, Lecture 6 1 CSE370, Lecture 6 2

Recall example using Boolean cube Karnaugh maps (K-map)

Flat representation of Boolean cubes


Easy to use for 2 4 dimensions A B F
On-set is covered by the OR of one 2-D subcube and Harder for 5 6 dimensions 0 0 0 1
one 3-D subcube Virtually impossible for >6 dimensions 1 0 1 0
Use CAD tools
A B C D (A'+A)BC 2 1 0 1
0 0 0 0 111
Help visualize adjacencies 3 1 1 0
0 0 1 0 On-set elements that have one variable
0 1 0 0
A(B+B')(C+C ) changing are adjacent A
0 1 1 1 B 101 0 1
1 0 0 1 Cin B
0 1 1
1 0 1 1 000 A 0 2
1 1 0 1 1 0
1 1 1 1 1 30

D = BC+A

CSE370, Lecture 6 3 CSE370, Lecture 6 4

2, 3, and 4 dimensional K-maps Adjacencies

Uses Gray code: Only one bit changes between cells Wraparound at edges
Example: 00 01 11 10 First column to last column
Top row to bottom row

A AB A 011 111
AB
00 01 11 10 C 00 01 11 10
A A CD 010
A AB
0 1 00 0 000 010 110 100
B C 00 01 11 10 0 4 12 8
001
0 2 6 4
0 0 01 B C 101
0 2 0 2 6 4 1 5 13 9 C 1
D 001 011 111 101
B 1 1
C 1 11 1 3 7 5
3 1 3 7 5 3 7 15 11 000 A 100
C B
B 10
2 6 14 10

CSE370, Lecture 6 5 CSE370, Lecture 6 6


K-map minimization example: 2 variables K-map minimization example: 3 variables

Find the least number of subcubes, each as large as possible, that cover the ON-set
Make sure subcubes contain 1, 2, 4, or 8 items (remember the Boolean cube)

A B Cin Cout
A B F 0 0 0 0
A A
0 0 0 1 B 0 1 0 0 1 0 AB
1 0 1 0 F = B' 0 1 0 0 Cin 00 01 11 10
0 1 1
0 2
0 1 1 1 0 0 0 1 0 Cout = AB + BCin + ACin
2 1 0 1 0 2 6 4
1 0 0 1 0 0 0
3 1 1 0 1 3 1 0 1 1 1
1 0 1 1 1 3 7 5
1 1 0 1 B
1 1 1 1 111

B
Cin
101
000 A
CSE370, Lecture 6 7 CSE370, Lecture 6 8

One more example: 3 variables K-map minimization example: minterms

Find the least number of subcubes, each as large as possible, that cover the ON-set
Make sure subcubes contain 1, 2, 4, or 8 items (remember the Boolean cube)

A B C D
AB A
0 0 0 0 A 00 01 11 10
0 0 1 0 AB C
0 1 0 0 C 00 01 11 10 F(A,B,C) = m(0,4,5,7) 0 1 0 0 1
0 2 6 4
0 1 1 1 0 0 0 1 1 D = A + BC = B'C'+AC
0 2 6 4 1 0 0 1 1
1 0 0 1 1
1 3 7 5

1 0 1 1 1
0 3
1 7
1 5
1
B
1 1 0 1 B 111
1 1 1 1

B 101
Cin
000 A
CSE370, Lecture 6 9 CSE370, Lecture 6 10

K-map minimization example: complement K-map minimization example: 4 variables

Minimize F(A,B,C,D) = m(0,2,3,5,6,7,8,10,11,14,15)


Answer: F = C+A'BD+B'D'

A
AB F(A,B,C) = m(0,4,5,7)
C 00 01 11 10 A
= B'C'+AC AB
0 1 0 0 1 CD 00 01 11 10 0111 1111
0 2 6 4

1 0 0 1 1 F'(A,B,C) = m(1,2,3,6) 00 1 0 0 1
0 4 12 8
1 3 7 5
= AC + BC 01 0 1 0 0
B 1 5 13 9 D C D
A
11 1 1 1 1 1000
3 7 15 11 0000 B
C
10 1 1 1 1
2 6 14 10

B
Find the least number of subcubes, each as large as possible, that cover the ON-set
CSE370, Lecture 6 11 CSE370, Lecture 6 12
How about Karnaugh Maps, 6 dimensions?
K-map minimization examples: on whiteboard K-maps become 3D CD
CD
EF 00 01 11 10
for 5 & 6 variables EF 00 01 11 10
00 1 0 0 0
F(A,B,C,D) = m(0,3,7,8,11,15) 00 0 0 0 0
F(A,B,C) = m(0,3,6,7) 01 0 0 1 1
F(A,B,C,D) = 01 0 0 1 1
AB = 00 AB = 01
F(A,B,C) = F(A,B,C,D) = 11 0 0 1 1
11 1 0 1 1

10
F'(A,B,C) = 10 0 0 0 0
1 0 0 0

AB CD CD
CD 00 01 11 10 EF 00 01 11 10 EF 00 01 11 10
00 OUTPUT = 00 0 0 0 0 00 0 0 0 0
AB 01 ABCDF + 01
00 01 11 10 0 0 1 1 01 0 0 1 1
C
AB = 11 AB = 10
0 11 CF + BCDE 11 1 0 1 1 11 0 0 1 1
1 10 10 1 0 0 0 10 0 0 0 0

CSE370, Lecture 6 13 CSE370, Lecture 6 14

Incompletely specified functions: Dont cares Truth table for a BCD increment-by-1

Functions of n inputs have 2n possible configurations INPUTS OUTPUTS


Some combinations may be unused
A B C D W X Y Z off-set for W: m0m6, m9
Call unused combinations dont cares 0 0 0 0 0 0 0 1
Exploit dont cares during logic minimization 0 0 0 1 0 0 1 0
0 0 1 0 0 0 1 1
Dont care no output 0 0 1 1 0 1 0 0
0 1 0 0 0 1 0 1
Example: A BCD increment-by-1 0 1 0 1 0 1 1 0 on-set for W: m7 and m8
Function F computes the next number in a BCD sequence 0 1 1 0 0 1 1 1
If the input is 00102, the output is 00112 0 1 1 1 1 0 0 0
1 0 0 0 1 0 0 1
BCD encodes decimal digits 09 as 0000210012 1 0 0 1 0 0 0 0
Dont care about binary numbers 1010211112 1 0 1 0 X X X X
1 0 1 1 X X X X Don't care set for W:
1 1 0 0 X X X X We don't care
1 1 0 1 X X X X about the output values
1 1 1 0 X X X X
1 1 1 1 X X X X
CSE370, Lecture 6 15 CSE370, Lecture 6 16

Notation Example: with dont cares

Don't cares in canonical forms F(A,B,C,D) = m(1,3,5,7,9) + d(6,12,13)


Three distinct logical sets: {on}, {off}, {dont care}
F = A'D + B'C'D without using don't cares
Canonical representations of a BCD increment-by-1 F = A'D + C'D using don't cares
Minterm expansion
W = m7+m8+d10+d11+d12+d13+d14+d15 A
AB
= m(7,8) + d(10,11,12,13,14,15) CD 00 01 11 10
Maxterm expansion 00 0 0 X 0 Assign X == "1"
W = M0M1M2M3M4M5M6M9D10D11D12D13D14D15 allows a 2-cube rather than a 1-cube
= M(0,1,2,3,4,5,6,9) D(10,11,12,13,14,15) 01 1 1 X 1
D
11 1 1 0 0
C
In K-maps, can treat don't cares as 0s or 1s 10 0 X 0 0
Depending on which is more advantageous B

CSE370, Lecture 6 17 CSE370, Lecture 6 18

Anda mungkin juga menyukai