Upload
poonamchopra7
View
441
Download
2
Embed Size (px)
Citation preview
Problem Areas in Boolean Algebra
Subject : Computer Science (083) Boolean AlgebraTopic : Minimization of Boolean Expressions Using Karnaugh Maps (K-Maps)
10/11/2015Karnaugh Maps1
Submitted By :Poonam ChopraPGT Computer ScienceMount Abu Public SchoolSec-5, Rohini,Delhi.
1
1
1
The operator keywordOverloading Unary operatorsOverloading Binary operatorsConstructors as conversion routinesConverting between basic and user-defined types
LEAD IN: Overloaded Unary Operators
Learning Objectives :
10/11/2015Karnaugh Maps2
After successfully completing this module students should be able to:
Understand the Need to simplify (minimize) expressions
List Different Methods for Minimization Karnaugh Maps Algebraic method
Use Karnaugh Map method to minimize the Boolean expression
Previous Knowledge :
10/11/2015Karnaugh Maps3The students should be familiar with the following terms in Boolean Algebra before going through this module on K-MAPSx
yx+y
Boolean variable, Constants and Operators Postulates of Boolean Algebra Theorems of Boolean Algebra Logic Gates- AND, OR, NOT, NAND, NOR Boolean Expressions and related terms MINTERM (Product Term) MAXTERM (Sum Term) Canonical Form of Expressions
10/11/2015Karnaugh Maps4 MinimizationOfBoolean Expressions
Who Developed it NEED For Minimization Different Methods What is K-Map Drawing a K-Map Minimization Steps Important Links Recap. K-Map Rules (SOP Exp.) K-Map Quiz
EXIT
Karnaugh MapsINDEX
10/11/2015Karnaugh Maps5
References
For K-Map Minimizer Downloadhttp://karnaugh.shuriksoft.comhttp://www.ee.surrey.ac.uk/Projects/Labview/minimisation/karrules.html
10/11/2015Karnaugh Maps6
The End
Boolean expressions are practically implemented in the form of GATES (Circuits).
A minimized Boolean expression means less number of gates which means
Simplified Circuit
10/11/2015Karnaugh Maps7
MINIMIZATION OF BOOLEAN EXPRESSIONWHY we Need to simplify (minimize) expressions?
7
3
3
Unary operators require no arguments because they automatically refer to the object that calls them.
For ageClass, the ++ and -- operators would intuitively increment and decrement the age data member.
LEAD IN: Return Values
10/11/2015Karnaugh Maps8
MINIMIZATION OF BOOLEAN EXPRESSIONDifferent methods
Karnaugh MapsAlgebraic Method
8
3
3
Unary operators require no arguments because they automatically refer to the object that calls them.
For ageClass, the ++ and -- operators would intuitively increment and decrement the age data member.
LEAD IN: Return Values
Karnaugh Maps10/11/2015Karnaugh Maps9WHAT is Karnaugh Map (K-Map)?
A special version of a truth table
Karnaugh Map (K-Map) is a GRAPHICAL display of fundamental terms in a Truth Table.
Dont require the use of Boolean Algebra theorems and equation
Works with 2,3,4 (even more) input variables (gets more and more difficult with more variables)
NEXT
10/11/2015Karnaugh Maps10
K-maps provide an alternate way of simplifying logic circuits. One can transfer logic values from a Truth Table into a K-Map.
The arrangement of 0s and 1s within a map helps in visualizing, leading directly to Simplified Boolean Expression
Karnaugh Maps(Contd.)
NEXT
Correspondence between the Karnaugh Map and the Truth Table for the general case of a two Variable Problem
10/11/2015Karnaugh Maps11
A
B
0
0
0
1
1
0
1
1
F
a
b
c
d
A \ B
0
1
0
a
b
1
c
d
The diagram below illustrates the correspondence between the Karnaugh map and the truth table for the general case of a two variable problem.
Truth Table
Karnaugh Map
A \ B
0
1
0
a
b
1
c
d
Truth Table2 Variable K-Map Karnaugh Maps(Contd.)
11
10/11/2015Karnaugh Maps12Drawing a Karnaugh Map (K-Map)
K-map is a rectangle made up of certain number of SQUARES For a given Boolean function there are 2N squares where N is the number of variables (inputs) In a K-Map for a Boolean Function with 2 Variables f(a,b) there will be 22=4 squares Each square is different from its neighbour by ONE Literal Each SQUARE represents a MAXTERM or MINTERM
NEXT
Karnaugh maps consist of a set of 22 squares where 2 is the number of variables in the Boolean expression being minimized.
10/11/2015Karnaugh Maps13
The diagram below illustrates the correspondence between the Karnaugh map and the truth table for the general case of a two variable problem.
Truth Table
Karnaugh Map
Truth Table2 Variable K-MapKarnaugh Maps(Contd.)
A \ B
0
1
0
0
1
1
1
1
1
A
B
F
0
0
0
0
1
1
1
0
1
1
1
1
Minterm
AB
AB
A B
A B
Maxterm
A + B
A + B
A + B
A + B
NEXT
For three and four variable expressions Maps with 23 = 8 and 24 = 16 cells are used.Each cell represents a MINTERM or a MAXTERM
10/11/2015Karnaugh Maps14
The diagram below illustrates the correspondence between the Karnaugh map and the truth table for the general case of a two variable problem.
Truth Table
Karnaugh Map
4 Variable K-Map 24 = 16 CellsKarnaugh Maps(Contd.)
BCA
00
01
11
10
0
1
A B \ C D
00
01
11
10
00
01
11
10
3 Variable K-Map 23 = 8 Cells
10/11/2015Karnaugh Maps15Minimization Steps (SOP Expression with 4 var.)The process has following steps: Draw the K-Map for given function as shown Enter the function values into the K-Map by placing 1's and 0's into the appropriate Cells
A B \ C D
00
01
11
10
00
0
0
0
1
0
3
0
2
01
0
0
0
0
11
1
1
0
0
10
1
1
0
0
0
5
0
4
0
7
0
6
0
0
121315148911 101111
NEXT
10/11/2015Karnaugh Maps16Minimization Steps (SOP Expression)
Form groups of adjacent 1's. Make groups as large as possible.Group size must be a power of two. i.e. Group of 8 (OCTET), 4 (QUAD), 2 (PAIR) or 1 (Single)
A B \ C D
00
01
11
10
00
0
0
0
1
0
3
0
2
01
0
0
0
0
11
1
1
0
0
10
1
1
0
0
0
5
0
4
0
7
0
6
0
0
121315148911 10
NEXT
10/11/2015Karnaugh Maps17Minimization Steps (SOP Expression)
Select the least number of groups that cover all the 1's.
1100110101110110 0
wxyz00 01 11 1000
01
11
10
3245761
12
131514
8911
10Ensure that every 1 is in a group.1's can be part of more than one group. Eliminate Redundant Groups
NEXT
Example: Reduce f(wxyz)=(1,3,4,5,7,10,11,12,14,15)10/11/2015Karnaugh Maps18PAIR (m4,m5)REDUNDANTGROUP
1100110101110110
0
wxyz00 01 11 1000
01
11
10
3245761
12
131514
8911
10
QUAD (m1,m3,m5,m7)
QUAD(m10,m11,m14,m15)
QUAD(m3,m7,m11,m15)REDUNDANT Group
PAIR (m4,m12) Minimized Expression : xyz + wy + wz
OCTET REDUCTION ( Group of 8:)10/11/2015Karnaugh Maps190011001100110011
W XYZ0 0 0 1 1 1 1 0 Y.Z Y.Z Y. Z Y. Z0 0W.X
0 1W.X
1 1W.X
1 0W.X
OCTET(m0,m1,m4,m5,m8, m9, m12,m13)
The term gets reduced by 3 literals i.e. 3 variables change within the group of 8 ( Octets )
NEXT
OCTET REDUCTION ( Group of 8:)10/11/2015Karnaugh Maps200110011001100110
W XYZ0 0 0 1 1 1 1 0 Y.Z Y.Z Y. Z Y. Z0 0W.X
0 1W.X
1 1W.X
1 0W.X
OCTET(m1,m3,m5,m7,m9, m11, m13,m15)
NEXT
OCTET REDUCTION ( Group of 8:)10/11/2015Karnaugh Maps21
MAP ROLLING
OCTET(m0,m2,m4,m6,m8, m10, m12,m14)1001100110011001
W XYZ0 0 0 1 1 1 1 0 Y.Z Y.Z Y. Z Y. Z0 0W.X
0 1W.X
1 1W.X
1 0W.X0132457612131514891110
NEXT
OCTET REDUCTION ( Group of 8:)10/11/2015Karnaugh Maps220000111111110000
W XYZ0 0 0 1 1 1 1 0 Y.Z Y.Z Y. Z Y. Z0 0W.X
0 1W.X
1 1W.X
1 0W.X
0132457612131514891110OCTET(m4,m5,m6,m7,m12, m13, m14,m15)
NEXT
OCTET REDUCTION ( Group of 8:)10/11/2015Karnaugh Maps23
MAP ROLLING
OCTET(m0,m1,m2,m3M8,m9,m10,m11)1111000000001111
W XYZ0 0 0 1 1 1 1 0 Y.Z Y.Z Y. Z Y. Z0 0W.X
0 1W.X
1 1W.X
1 0W.X0132457612131514891110
QUAD REDUCTION ( Group of 4)10/11/2015Karnaugh Maps241100111101110110 0
WXYZ
3245761
12
131514
8911
10
QUAD (m1,m3,m5,m7)
QUAD(m10,m11,m14,m15)
QUAD(m4,m5,m12,m13)
0 0 0 1 1 1 1 0 Y.Z Y.Z Y. Z Y. Z0 0W.X
0 1W.X
1 1W.X
1 0W.X
The term gets reduced by 2 literals i.e. 2 variables change within the group of 4( QUAD )
NEXT
QUAD REDUCTION ( Group of 4)10/11/2015Karnaugh Maps25
MAP ROLLING
QUAD (m1,m3,m9,m11)QUAD(m4,m6,m12,m14)1110111111110110 0
WXYZ
3245761
12
131514
8911
10
0 0 0 1 1 1 1 0 Y.Z Y.Z Y. Z Y. Z0 0W.X
0 1W.X
1 1W.X
1 0W.X
NEXT
QUAD REDUCTION ( Group of 4)10/11/2015Karnaugh Maps26QUAD(m0,m2,m8,m10)
1001000000001001 0
WXYZ3245761
12
131514
8911
100 0 0 1 1 1 1 0 Y.Z Y.Z Y. Z Y. Z0 0W.X
0 1W.X
1 1W.X
1 0W.X
CORNER ROLLING
SINGLE CELL REDUCTION 10/11/2015Karnaugh Maps271100110100000010
wxyz00 01 11 1000
01
11
10
SINGLE CELL (m1)
SINGLE CELL (m12)QUAD(m10,m11,m14,m15)
The term is not reduced in a single cell
PAIR REDUCTION ( Group of 2)10/11/2015Karnaugh Maps28YZMAP ROLLINGPAIR(m0,m2)0000000001101001 0
WX3245761
12
131514
8911
10PAIR(m5,m7)0 0 0 1 1 1 1 0 Y.Z Y.Z Y. Z Y. Z0 0W.X
0 1W.X
1 1W.X
1 0W.X
The term gets reduced by 1 literals i.e. 1 variables change within the group of 2( PAIR )
10/11/2015Karnaugh Maps29
Groups may not include any cell containing a zero
NEXTKarnaugh Maps - Rules of Simplification (SOP Expression)
10/11/2015Karnaugh Maps30
Groups may be horizontal or vertical, but not diagonal.
NEXTKarnaugh Maps - Rules of Simplification (SOP Expression)
10/11/2015Karnaugh Maps31
Groups must contain 1, 2, 4, 8, or in general 2n cells. That is if n = 1, a group will contain two 1's since 21 = 2. If n = 2, a group will contain four 1's since 22 = 4.
NEXTKarnaugh Maps - Rules of Simplification (SOP Expression)
10/11/2015Karnaugh Maps32
Each group should be as large as possible.
NEXTKarnaugh Maps - Rules of Simplification (SOP Expression)
10/11/2015Karnaugh Maps33
Each cell containing a 1 must be in at least one group.
NEXTKarnaugh Maps - Rules of Simplification (SOP Expression)
10/11/2015Karnaugh Maps34
Groups may overlap.
NEXTKarnaugh Maps - Rules of Simplification (SOP Expression)
10/11/2015Karnaugh Maps35
Groups may wrap around the table. The leftmost cell in a row may be grouped with the rightmost cell and The top cell in a column may be grouped with the bottom cell.
NEXTKarnaugh Maps - Rules of Simplification (SOP Expression)
10/11/2015Karnaugh Maps36
There should be as few groups as possible, as long as this does not contradict any of the previous rules.
NEXTKarnaugh Maps - Rules of Simplification
(SOP Expression)
10/11/2015Karnaugh Maps37
No 0s allowed in the groups. No diagonal grouping allowed. Groups should be as large as possible. Only power of 2 number of cells in each group. Every 1 must be in at least one group. Overlapping allowed. Wrap around allowed. Fewest number of groups are considered. Redundant groups ignored
Karnaugh Maps - Rules of Simplification
(SOP Expression)
10/11/2015Karnaugh Maps38
Minimalization logic function with 3-10inputs. Draw karnaugh map Draw shema Covert to NOR and NANDS.
Karnaugh map minimalization software is freeware.
Karnaugh Minimizer is a tool for developers of small digital devices and radio amateurs, also for those who is familiar with Boolean algebra, mostly for electrical engineering students.
Important Links
K-Min
10/11/2015Karnaugh Maps39
Who Developed K-MapsName: Maurice Karnaugh, a telecommunications engineer at Bell Labs. While designing digital logic based telephone switching circuits he developed a method for Boolean expression minimization.
Year : 1950 same year that Charles M. Schulz published his first Peanuts comic.