0% found this document useful (0 votes)
8 views

Chapter 3

pdf
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Chapter 3

pdf
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Chapter 3 Gate-Level

Minimization
◼ A Karnaugh map is a graphical method used to
obtained the most simplified form of an expression
in a standard form (Sum-of-Products or Product-of-
Sums
◼ The map is made up of squares, with each square
representing one minterm of the function.
◼ This produces a circuit diagram with a minimum
number of gates and the minimum number of
inputs to the gate.
◼ It is sometimes possible to find two or more
expressions that satisfy the minimization criteria. 1
What are Karnaugh1 maps?
◼ Karnaugh maps provide an alternative way of
simplifying logic circuits.
◼ Instead of using Boolean algebra simplification
techniques, you can transfer logic values from a
Boolean statement or a truth table into a Karnaugh
map.
◼ The arrangement of 0's and 1's within the map
helps you to visualise the logic relationships
between the variables and leads directly to a
simplified Boolean statement.

1Named for the American electrical engineer Maurice Karnaugh.


Karnaugh maps
◼ Karnaugh maps, or K-maps, are often used to simplify logic problems
with 2, 3 or 4 variables.

Cell = 2n ,where n is a number of variables

For the case of 2 variables, we form a map consisting


of 22=4 cells as shown in Figure
A 0 1 A 0 1 A 0 1
B B B
+ 00 10
0 A B A + B 0 0 2 0 A B AB
1 A+ B A + B 1 01 11 1
1 3 A B AB
Maxterm Minterm
Karnaugh maps
◼ 3 variables Karnaugh map

Cell = 23=8

AB
C 00 01 11 10
0 1 3 2
0
A B C A BC ABC AB C
4 5 7 6
1 A B C A BC ABC AB C
Karnaugh maps
◼ 4 variables Karnaugh map
AB
CD 00 01 11 10
0 1 3 2
00
4 5 7 6
01

12 13 15 14
11

8 9 11 10
10
Five-variable map
◼ Fig.3-12, the left-hand four-variable map represents the 16 squares
where A=0, and the other four-variable map represents the squares
where A=1.
◼ In addition, each square in the A=0 map is adjacent to the
corresponding square in the A=1 map.

6
Karnaugh maps
◼ The Karnaugh map is completed by entering a
'1‘(or ‘0’) in each of the appropriate cells.
◼ Within the map, adjacent cells containing 1's (or
0’s) are grouped together in twos, fours, or
eights.
Example: Groupings on 3-Variable K-Maps
A 0 1 F(A,B,C) = A’B’
BC
00 1 0
011 0
BC 0 1
110 0
00 1 1
10 0 0 01 0 0
11 0 0 F(A,B,C) = C’
A 0 1
BC 10 1 1
00 1 1 Remember that
01 1 1 top and bottom
11 0 0 F(A,B,C) = B’ of map are
adjacent
10 0 0

8
A
Example: Multiple Groupings
0 1
BC Want to cover all ‘1’s with
00 1 0
largest possible
011 1 groupings.
110 0
F(A,B,C) = B’C + A’B’
10 0 0

A
0 1
BC Groupings of only a single ‘1’
00 0 1 are ok if larger groupings
01 0 0 cannot be found.
11 1 0 F(A,B,C) = AB’C’ + A’B
10 1 0

9
A 0 Illegal Groupings
1
BC
00 1 0
01 0 Illegal Grouping!
1 Minterms are not boolean
11 0 0 adjacent!
A’B’C’ , AB’C will NOT reduce
10 0 0
to a single product term
A’B’C’ + AB’C = B’(A’C’+AC)

Valid groupings will always be a power of 2.


(will cover 1, 2, 4, 8, etc. minterms).

10
Example: Groupings on four Variable Map
AB
CD 00 01 11 10
00 0 0 0 0
01 0 0 0 0
11 1 0 1 0
10 1 1 0 1

F(A,B,C,D) = A’B’C + A’CD’ + B’CD’ + ABCD

11
Example: Groupings on four Variable Map
AB
CD 00 01 11 10
00 1 0 0 1
01 1 0 0 1
11 1 0 0 1
10 1 0 0 1

F (A,B,C,D) = B’

12
More than one way to group…..
AB
F (A,B,C,D) = B’D + C’D’ +
CD 00 01 11 10
00 1 1 1 1 CD’
01 1 0 0 1
11 1 0 0 1
10 1 1 1 1
Want LARGEST groupings
that can cover ‘1’s.
AB
CD 00 01 11 10
00 1 1 1 1 F (A,B,C,D) = B’ + D’
01 1 0 0 1
11 1 0 0 1
10 1 1 1 1
13
Two Solutions
AB EACH solution is equally
CD 00 01 11 10 valid.
00 1 1 0 0 F(A,B,C,D) = A’C’ + ACD +
01 1 A’BD
1 0 0
11 0 Essential
1 1 1
PIs
10 0 0 0 0 Non-
Essential
AB PIs
CD 00 01 11 10
00 1 1 0 0
01 1 1 0 0 F(A,B,C,D) = A’C’ + ACD +
11 0 1 1 1 BCD
10 0 0 0 0
14
Don't Care Conditions
◼ There may be a combination of input values which
◼ will never occur
◼ if they do occur, the output is of no concern.
◼ The function value for such combinations is called a
don't care.
◼ They are denoted with x or –. Each x may be
arbitrarily assigned the value 0 or 1 in an
implementation.
◼ Don’t cares can be used to further simplify a
function

2023/9/13 Boolean Algebra PJF - 15


Example: Don’t Cares

Recall that Don’t


Row ABCD F(A,B,C,D)
0 00 00 0 Cares are labeled as
1 00 01 0 ‘X’s in truth table.
2 00 10 1 Can treat X’s as
3 00 11 1 either ‘0’s or ‘1’s
4 01 00 0
5 01 01 0 A F(ABCD) F
6 01 10 1 B Recognize BCD
7 01 11 0 C numbers: 2,3,6
8 10 00 0 D
9 10 01 0 Non-BCD numbers are
10 10 10 x don’t cares because will
11 10 11 x
12 11 00 x never be applied as
13 11 01 x inputs.
14 11 10 x
15 11 11 x
16
Don’t Cares treated as ‘0’s or ‘1’s
AB
CD 00 01 11 10
Treat X’s as 1’s when
00 0 0 X 0
can get a larger
01 0 0 X 0 grouping. (Not all
11 1 0 X X X’s need to be
10 1 1 X X covered.)

F(A,B,C,D) = CD’ + B’C

17
Example: Minimizing ‘0’s
Grouping ‘0’s produces an
0 1 equation for F’.
BC
00 1 1
01 0 0 F(A,B,C) = C’
11 0 0
10 1 1 F’(A,B,C) = C

18
Example
Ex. 3-3 F(x, y, z) = ∑(0, 2, 4, 5, 6)

F = z’ + xy’

19
Exercise
f =  (0,4) = B C f =  (4,5) = A B f =  (0,1,4,5) = B f =  (0,1,2,3) = A

BC BC BC BC
A 00 01 11 10 A 00 01 11 10 A 00 01 11 10 A 00 01 11 10
0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1

1 1 0 0 0 1 1 1 0 0 1 1 1 0 0 1 0 0 0 0

f =  (0,4) = A C f =  (4,6) = A C f =  (0,2) = A C f =  (0,2,4,6) = C

BC BC BC BC
A 00 01 11 10 A 00 01 11 10 A 00 01 11 10 A 00 01 11 10
0 0 1 1 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1
1 0 0 0 0 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1

20
Example
Ex. 3-6 F = A’B’C’ + B’CD’ + A’BCD’ + AB’C’
= B’D’ + B’C’ + A’CD’

21
Exercise
CD CD CD CD
00 01 11 10 00 01 11 10 00 01 11 10 00 01 11 10
AB AB AB AB
00 1 0 0 0 00 0 0 0 0 00 0 0 0 0 00 0 0 0 0

01 0 0 0 0 01 0 1 0 0 01 0 0 0 0 01 1 0 0 1

11 0 0 0 0 11 0 1 0 0 11 0 1 1 0 11 0 0 0 0

10 1 0 0 0 10 0 0 0 0 10 0 0 0 0 10 0 0 0 0

f =  (5,13) = B • C • D f =  (13,15) = A • B • D f =  (4,6) = A • B • D


f =  (0,8) = B • C • D

CD CD CD CD
00 01 11 10 00 01 11 10 00 01 11 10 00 01 11 10
AB AB AB AB
00 0 0 1 1 00 0 0 0 0 00 0 0 1 1 00 1 0 0 1

01 0 0 1 1 01 1 0 0 1 01 0 0 0 0 01 0 0 0 0

11 0 0 0 0 11 1 0 0 1 11 0 0 0 0 11 0 0 0 0

10 0 0 0 0 10 0 0 0 0 10 0 0 1 1 10 1 0 0 1

f =  (2,3,6,7) = A • C f =  (4,6,12,14) = B • D f =  (2,3,10,11) = B • C f =  (0,2,8,10) = B • D

22
Exercise
CD CD CD CD
AB 00 01 11 10 AB 00 01 11 10 AB 00 01 11 10 AB 00 01 11 10
00 0 0 0 0 00 0 0 1 0 00 1 0 1 0 00 0 1 0 1

01 1 1 1 1 01 0 0 1 0 01 0 1 0 1 01 1 0 1 0

11 0 0 0 0 11 0 0 1 0 11 1 0 1 0 11 0 1 0 1

10 0 0 0 0 10 0 0 1 0 10 0 1 0 1 10 1 0 1 0

f =  (0, 3,5, 6, 9,10,12,15) f =  (1, 2, 4, 7,8,11,13,14)


f =  (4,5, 6, 7) = A • B f =  (3,7,11,15) = C • D
f = A  B C D f = A  B C D

CD CD CD CD
00 01 11 10 00 01 11 10 00 01 11 10 00 01 11 10
AB AB AB AB
00 0 1 1 0 00 1 0 0 1 00 0 0 0 0 00 1 1 1 1

01 0 1 1 0 01 1 0 0 1 01 1 1 1 1 01 0 0 0 0

11 0 1 1 0 11 1 0 0 1 11 1 1 1 1 11 0 0 0 0

10 0 1 1 0 10 1 0 0 1 10 0 0 0 0 10 1 1 1 1

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

23
Example
Ex. 3-7 F(A, B, C, D, E) = (0, 2, 4, 6, 9, 13, 21, 23, 25, 29, 31)
Because of both parts of the map have the common term (A’BD’E+ABD’E)
so the sum of products is
F = A’B’E’ + BD’E + ACE

common

24
3-5. Don’t care conditions
Ex.3-9 Simplify the F (w, x, y, z)= ∑(1, 3, 7, 11, 15) with
don’t-care conditions d(w, x, y, z) = ∑(0, 2, 5)
In part (a) with minterms 0 and 2→ F = yz + w’x’
In part (b) with minterm 5 → F = yz + w’z

25
Example Don’t care cd
ab 00 01 11 10
00 0 1 0 1
01 1 1 0 1

◼ Simplify the function f(a,b,c,d)11 0 0 x x


1 1 x x
whose K-map is shown at the 10
right. 0 1 0 1
◼ f = a’c’d+ab’+cd’+a’bc’ 1 1 0 1
0 0 x x
or 1 1 x x
◼ f = a’c’d+ab’+cd’+a’bd’
0 1 0 1
1 1 0 1
0 0 x x
1 1 x x
2023/9/13 Boolean Algebra PJF - 26
cd
ab
Another Example x 1 0 0
1 x 0 x
◼ Simplify the function 1 x x 1
0 x x 0
g(a,b,c,d) whose K-map
is shown at right. x 1 0 0
◼ g = a’c’+ ab 1 x 0 x
1 x x 1
or 0 x x 0
◼ g = a’c’+b’d
x 1 0 0
1 x 0 x
1 x x 1
0 x x 0

2023/9/13 Boolean Algebra PJF - 27


3-4. Product of sums
simplification
◼ If we mark the empty squares by 0’s rather than
1’s and combine them into valid adjacent squares,
we obtain the complement of the function, F’. Use
the DeMorgan’s theorem, we can get the product
of sums.
Ex.3-8 Simplify the Boolean function in
(a) sum of products
(b) product of sums
F(A, B, C, D) = ∑(0, 1, 2, 5, 8, 9, 10)

28
Example
(a) SOPs

F= B’D’+ B’C’ + A’C’D

(b) POSs
F’= AB + CD + BD’
By DeMorgan’s thm
F= (A’+B’) .(C’+D’)
.(B’+D)
29
Example: Group 0’s, then Complement to
get POS
AB
CD 00 01 11 10
F’(A,B,C,D) = C’ + BD
00 0 0 X 0
01 0 0 X 0 Take inverse of both sides
11 1 F(A,B,C,D) = (C’ + BD)’
0 X X
= C (BD)’
10 1 1 X X = C (B’+D’)

Grouping zeros, then applying inverse to both


sides is a way to get to minimum POS form

30
Exchange minterm and maxterm
◼ Consider the truth table
that defines the function F
in Table 3-2.
Sum of minterms
F(x, y, z) = ∑(1, 3, 4, 6)
Product of maxterms
F(x, y, z) = ∏(0, 2, 5, 7)
◼ In the other words, the 1’s

of the function represent


the minterms, and the 0’s
represent the maxterms.

31
Practice 1:Combinational circuit Design
◼ Example: Design a 3-input (A,B,C) digital
circuit that will give at its output (X) a logic 1
only if the binary number formed at the
input has more ones than zeros.

32
Inputs Output
A B C X X =  (3, 5, 6, 7)
0 0 0 0 0
1 0 0 1 0 X
BC
2 0 1 0 0 A 00 01 11 10
3 0 1 1 1 0 0 0 1 0
4 1 0 0 0 1 0 1 1 1
5 1 0 1 1
6 1 1 0 1
7 1 1 1 1 X = AC + AB + BC
A B C

33
Practice 2:Combinational circuit Design
◼ Example: Design a 4-input (A,B,C,D) digital circuit that will give at its
output (X) a logic 1 only if the binary number formed at the input is
between 2 and 9 (including).

34
Inputs Output
A B C D X X =  (2,3,4,5,6 ,7,8,9)
0 0 0 0 0 0
1 0 0 0 1 0 X
2 0 0 1 0 1 CD
3 0 0 1 1 1 AB 00 01 11 10
4 0 1 0 0 1 00 0 0 1 1 Same
5 0 1 0 1 1
01 1 1 1 1
6 0 1 1 0 1
7 0 1 1 1 1 11 0 0 0 0
8 1 0 0 0 1 10 1 1 0 0
9 1 0 0 1 1
10 1 0 1 0 0
11 1 0 1 1 0
12 1 1 0 0 0 X = AC + AB + A B C
13 1 1 0 1 0
14 1 1 1 0 0
15 1 1 1 1 0 A B C D X

35
Exercise
◼ Design logic circuit that convert a 4-bits binary code to Excess-3 code
A B C D W X Y Z
0 0 0 0 0 0 1 1
0 0 0 1 0 1 0 0
0 0 1 0 0 1 0 1
0 0 1 1 0 1 1 0
0 1 0 0 0 1 1 1
0 1 0 1 1 0 0 0
0 1 1 0 1 0 0 1
0 1 1 1 1 0 1 0
1 0 0 0 1 0 1 1
1 0 0 1 1 1 0 0
1 0 1 0 x x x x
1 0 1 1 x x x x
1 1 0 0 x x x x
1 1 0 1 x x x x
1 1 1 0 x X X X
1 1 1 1 X X x x

You might also like