fbpx
Wikipedia

Karnaugh map

The Karnaugh map (KM or K-map) is a method of simplifying Boolean algebra expressions. Maurice Karnaugh introduced it in 1953[1][2] as a refinement of Edward W. Veitch's 1952 Veitch chart,[3][4] which was a rediscovery of Allan Marquand's 1881 logical diagram[5][6] aka Marquand diagram[4] but with a focus now set on its utility for switching circuits.[4] Veitch charts are also known as Marquand–Veitch diagrams[4] or, rarely, as Svoboda charts,[7] and Karnaugh maps as Karnaugh–Veitch maps (KV maps).

An example Karnaugh map. This image actually shows two Karnaugh maps: for the function ƒ, using minterms (colored rectangles) and for its complement, using maxterms (gray rectangles). In the image, E() signifies a sum of minterms, denoted in the article as .

The Karnaugh map reduces the need for extensive calculations by taking advantage of humans' pattern-recognition capability.[1] It also permits the rapid identification and elimination of potential race conditions.[clarification needed]

The required Boolean results are transferred from a truth table onto a two-dimensional grid where, in Karnaugh maps, the cells are ordered in Gray code,[8][4] and each cell position represents one combination of input conditions. Cells are also known as minterms, while each cell value represents the corresponding output value of the boolean function. Optimal groups of 1s or 0s are identified, which represent the terms of a canonical form of the logic in the original truth table.[9] These terms can be used to write a minimal Boolean expression representing the required logic.

Karnaugh maps are used to simplify real-world logic requirements so that they can be implemented using a minimum number of logic gates. A sum-of-products expression (SOP) can always be implemented using AND gates feeding into an OR gate, and a product-of-sums expression (POS) leads to OR gates feeding an AND gate. The POS expression gives a complement of the function (if F is the function so its complement will be F').[10] Karnaugh maps can also be used to simplify logic expressions in software design. Boolean conditions, as used for example in conditional statements, can get very complicated, which makes the code difficult to read and to maintain. Once minimised, canonical sum-of-products and product-of-sums expressions can be implemented directly using AND and OR logic operators.[11]

Example Edit

Karnaugh maps are used to facilitate the simplification of Boolean algebra functions. For example, consider the Boolean function described by the following truth table.

Truth table of a function
  A B C D  
0 0 0 0 0 0
1 0 0 0 1 0
2 0 0 1 0 0
3 0 0 1 1 0
4 0 1 0 0 0
5 0 1 0 1 0
6 0 1 1 0 1
7 0 1 1 1 0
8 1 0 0 0 1
9 1 0 0 1 1
10 1 0 1 0 1
11 1 0 1 1 1
12 1 1 0 0 1
13 1 1 0 1 1
14 1 1 1 0 1
15 1 1 1 1 0

Following are two different notations describing the same function in unsimplified Boolean algebra, using the Boolean variables A, B, C, D and their inverses.

  •   where   are the minterms to map (i.e., rows that have output 1 in the truth table).
  •   where   are the maxterms to map (i.e., rows that have output 0 in the truth table).
 
K-map drawn on a torus, and in a plane. The dot-marked cells are adjacent.
 
K-map construction. Instead of the output values (the rightmost values in the truth table), this diagram shows a decimal representation of the input ABCD (the leftmost values in the truth table), therefore it is not a Karnaugh map.
 
In three dimensions, one can bend a rectangle into a torus.

Construction Edit

In the example above, the four input variables can be combined in 16 different ways, so the truth table has 16 rows, and the Karnaugh map has 16 positions. The Karnaugh map is therefore arranged in a 4 × 4 grid.

The row and column indices (shown across the top and down the left side of the Karnaugh map) are ordered in Gray code rather than binary numerical order. Gray code ensures that only one variable changes between each pair of adjacent cells. Each cell of the completed Karnaugh map contains a binary digit representing the function's output for that combination of inputs.

Grouping Edit

After the Karnaugh map has been constructed, it is used to find one of the simplest possible forms — a canonical form — for the information in the truth table. Adjacent 1s in the Karnaugh map represent opportunities to simplify the expression. The minterms ('minimal terms') for the final expression are found by encircling groups of 1s in the map. Minterm groups must be rectangular and must have an area that is a power of two (i.e., 1, 2, 4, 8...). Minterm rectangles should be as large as possible without containing any 0s. Groups may overlap in order to make each one larger. The optimal groupings in the example below are marked by the green, red and blue lines, and the red and green groups overlap. The red group is a 2 × 2 square, the green group is a 4 × 1 rectangle, and the overlap area is indicated in brown.

The cells are often denoted by a shorthand which describes the logical value of the inputs that the cell covers. For example, AD would mean a cell which covers the 2x2 area where A and D are true, i.e. the cells numbered 13, 9, 15, 11 in the diagram above. On the other hand, AD would mean the cells where A is true and D is false (that is, D is true).

The grid is toroidally connected, which means that rectangular groups can wrap across the edges (see picture). Cells on the extreme right are actually 'adjacent' to those on the far left, in the sense that the corresponding input values only differ by one bit; similarly, so are those at the very top and those at the bottom. Therefore, AD can be a valid term—it includes cells 12 and 8 at the top, and wraps to the bottom to include cells 10 and 14—as is BD, which includes the four corners.

Solution Edit

 
Diagram showing two K-maps. The K-map for the function f(A, B, C, D) is shown as colored rectangles which correspond to minterms. The brown region is an overlap of the red 2×2 square and the green 4×1 rectangle. The K-map for the inverse of f is shown as gray rectangles, which correspond to maxterms.

Once the Karnaugh map has been constructed and the adjacent 1s linked by rectangular and square boxes, the algebraic minterms can be found by examining which variables stay the same within each box.

For the red grouping:

  • A is the same and is equal to 1 throughout the box, therefore it should be included in the algebraic representation of the red minterm.
  • B does not maintain the same state (it shifts from 1 to 0), and should therefore be excluded.
  • C does not change. It is always 0, so its complement, NOT-C, should be included. Thus, C should be included.
  • D changes, so it is excluded.

Thus the first minterm in the Boolean sum-of-products expression is AC.

For the green grouping, A and B maintain the same state, while C and D change. B is 0 and has to be negated before it can be included. The second term is therefore AB. Note that it is acceptable that the green grouping overlaps with the red one.

In the same way, the blue grouping gives the term BCD.

The solutions of each grouping are combined: the normal form of the circuit is  .

Thus the Karnaugh map has guided a simplification of

 

It would also have been possible to derive this simplification by carefully applying the axioms of Boolean algebra, but the time it takes to do that grows exponentially with the number of terms.

Inverse Edit

The inverse of a function is solved in the same way by grouping the 0s instead.[nb 1]

The three terms to cover the inverse are all shown with grey boxes with different colored borders:

  • brown: A B
  • gold: A C
  • blue: BCD

This yields the inverse:

 

Through the use of De Morgan's laws, the product of sums can be determined:

 

Don't cares Edit

 
The value of   for ABCD = 1111 is replaced by a "don't care". This removes the green term completely and allows the red term to be larger. It also allows blue inverse term to shift and become larger

Karnaugh maps also allow easier minimizations of functions whose truth tables include "don't care" conditions. A "don't care" condition is a combination of inputs for which the designer doesn't care what the output is. Therefore, "don't care" conditions can either be included in or excluded from any rectangular group, whichever makes it larger. They are usually indicated on the map with a dash or X.

The example on the right is the same as the example above but with the value of f(1,1,1,1) replaced by a "don't care". This allows the red term to expand all the way down and, thus, removes the green term completely.

This yields the new minimum equation:

 

Note that the first term is just A, not AC. In this case, the don't care has dropped a term (the green rectangle); simplified another (the red one); and removed the race hazard (removing the yellow term as shown in the following section on race hazards).

The inverse case is simplified as follows:

 

Through the use of De Morgan's laws, the product of sums can be determined:

 

Race hazards Edit

Elimination Edit

Karnaugh maps are useful for detecting and eliminating race conditions. Race hazards are very easy to spot using a Karnaugh map, because a race condition may exist when moving between any pair of adjacent, but disjoint, regions circumscribed on the map. However, because of the nature of Gray coding, adjacent has a special definition explained above – we're in fact moving on a torus, rather than a rectangle, wrapping around the top, bottom, and the sides.

  • In the example above, a potential race condition exists when C is 1 and D is 0, A is 1, and B changes from 1 to 0 (moving from the blue state to the green state). For this case, the output is defined to remain unchanged at 1, but because this transition is not covered by a specific term in the equation, a potential for a glitch (a momentary transition of the output to 0) exists.
  • There is a second potential glitch in the same example that is more difficult to spot: when D is 0 and A and B are both 1, with C changing from 1 to 0 (moving from the blue state to the red state). In this case the glitch wraps around from the top of the map to the bottom.
 
Race hazards are present in this diagram.
 
Above diagram with consensus terms added to avoid race hazards.

Whether glitches will actually occur depends on the physical nature of the implementation, and whether we need to worry about it depends on the application. In clocked logic, it is enough that the logic settles on the desired value in time to meet the timing deadline. In our example, we are not considering clocked logic.

In our case, an additional term of   would eliminate the potential race hazard, bridging between the green and blue output states or blue and red output states: this is shown as the yellow region (which wraps around from the bottom to the top of the right half) in the adjacent diagram.

The term is redundant in terms of the static logic of the system, but such redundant, or consensus terms, are often needed to assure race-free dynamic performance.

Similarly, an additional term of   must be added to the inverse to eliminate another potential race hazard. Applying De Morgan's laws creates another product of sums expression for f, but with a new factor of  .

2-variable map examples Edit

The following are all the possible 2-variable, 2 × 2 Karnaugh maps. Listed with each is the minterms as a function of   and the race hazard free (see previous section) minimum equation. A minterm is defined as an expression that gives the most minimal form of expression of the mapped variables. All possible horizontal and vertical interconnected blocks can be formed. These blocks must be of the size of the powers of 2 (1, 2, 4, 8, 16, 32, ...). These expressions create a minimal logical mapping of the minimal logic variable expressions for the binary expressions to be mapped. Here are all the blocks with one field.

A block can be continued across the bottom, top, left, or right of the chart. That can even wrap beyond the edge of the chart for variable minimization. This is because each logic variable corresponds to each vertical column and horizontal row. A visualization of the k-map can be considered cylindrical. The fields at edges on the left and right are adjacent, and the top and bottom are adjacent. K-Maps for four variables must be depicted as a donut or torus shape. The four corners of the square drawn by the k-map are adjacent. Still more complex maps are needed for 5 variables and more.

Related graphical methods Edit

Related graphical minimization methods include:

  • Marquand diagram (1881) by Allan Marquand (1853–1924)[5][6][4]
  • Veitch chart (1952) by Edward W. Veitch (1924–2013)[3][4]
  • Svoboda chart (1956) by Antonín Svoboda (1907–1980)[7]
  • Mahoney map (M-map, designation numbers, 1963) by Matthew V. Mahoney (a reflection-symmetrical extension of Karnaugh maps for larger numbers of inputs)
  • Reduced Karnaugh map (RKM) techniques (from 1969) like infrequent variables, map-entered variables (MEV), variable-entered map (VEM) or variable-entered Karnaugh map (VEKM) by G. W. Schultz, Thomas E. Osborne, Christopher R. Clare, J. Robert Burgoon, Larry L. Dornhoff, William I. Fletcher, Ali M. Rushdi and others (several successive Karnaugh map extensions based on variable inputs for a larger numbers of inputs)
  • Minterm-ring map (MRM, 1990) by Thomas R. McCalla (a three-dimensional extension of Karnaugh maps for larger numbers of inputs)

See also Edit

Notes Edit

  1. ^ This should not be confused with the negation of the result of the previously found function.

References Edit

  1. ^ a b Karnaugh, Maurice (November 1953) [1953-04-23, 1953-03-17]. (PDF). Transactions of the American Institute of Electrical Engineers, Part I: Communication and Electronics. 72 (5): 593–599. doi:10.1109/TCE.1953.6371932. Paper 53-217. Archived from the original (PDF) on 2017-04-16. Retrieved 2017-04-16. (NB. Also contains a short review by Samuel H. Caldwell.)
  2. ^ Curtis, Herbert Allen (1962). A new approach to the design of switching circuits. The Bell Laboratories Series (1 ed.). Princeton, New Jersey, USA: D. van Nostrand Company, Inc. ISBN 0-44201794-4. OCLC 1036797958. S2CID 57068910. ISBN 978-0-44201794-1. ark:/13960/t56d6st0q. (viii+635 pages) (NB. This book was reprinted by Chin Jih in 1969.)
  3. ^ a b Veitch, Edward Westbrook (1952-05-03) [1952-05-02]. "A Chart Method for Simplifying Truth Functions". Transactions of the 1952 ACM Annual Meeting. ACM Annual Conference/Annual Meeting: Proceedings of the 1952 ACM Annual Meeting (Pittsburgh, Pennsylvania, USA). New York, USA: Association for Computing Machinery (ACM): 127–133. doi:10.1145/609784.609801.
  4. ^ a b c d e f g Brown, Frank Markham (2012) [2003, 1990]. Boolean Reasoning - The Logic of Boolean Equations (reissue of 2nd ed.). Mineola, New York: Dover Publications, Inc. ISBN 978-0-486-42785-0. [1]
  5. ^ a b Marquand, Allan (1881). "XXXIII: On Logical Diagrams for n terms". The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science. 5. 12 (75): 266–270. doi:10.1080/14786448108627104. Retrieved 2017-05-15. (NB. Quite many secondary sources erroneously cite this work as "A logical diagram for n terms" or "On a logical diagram for n terms".)
  6. ^ a b Gardner, Martin (1958). "6. Marquand's Machine and Others". Logic Machines and Diagrams (1 ed.). New York, USA: McGraw-Hill Book Company, Inc. pp. 104–116. ISBN 1-11784984-8. LCCN 58-6683. ark:/13960/t5cc1sj6b. (x+157 pages)
  7. ^ a b Klir, George Jiří (May 1972). "Reference Notations to Chapter 2". Introduction to the Methodology of Switching Circuits (1 ed.). Binghamton, New York, USA: Litton Educational Publishing, Inc. / D. van Nostrand Company. p. 84. ISBN 0-442-24463-0. LCCN 72-181095. C4463-000-3. (xvi+573+1 pages)
  8. ^ Wakerly, John F. (1994). Digital Design: Principles & Practices. New Jersey, USA: Prentice Hall. pp. 48–49, 222. ISBN 0-13-211459-3. (NB. The two page sections taken together say that K-maps are labeled with Gray code. The first section says that they are labeled with a code that changes only one bit between entries and the second section says that such a code is called Gray code.)
  9. ^ Belton, David (April 1998). "Karnaugh Maps – Rules of Simplification". from the original on 2017-04-18. Retrieved 2009-05-30.
  10. ^ Dodge, Nathan B. (September 2015). "Simplifying Logic Circuits with Karnaugh Maps" (PDF). The University of Texas at Dallas, Erik Jonsson School of Engineering and Computer Science. (PDF) from the original on 2017-04-18. Retrieved 2017-04-18.
  11. ^ Cook, Aaron. "Using Karnaugh Maps to Simplify Code". Quantum Rarity. from the original on 2017-04-18. Retrieved 2012-10-07.

Further reading Edit

  • Katz, Randy Howard (1998) [1994]. Contemporary Logic Design. The Benjamin/Cummings Publishing Company. pp. 70–85. doi:10.1016/0026-2692(95)90052-7. ISBN 0-8053-2703-7.
  • Vingron, Shimon Peter (2004) [2003-11-05]. "Karnaugh Maps". Switching Theory: Insight Through Predicate Logic. Berlin, Heidelberg, New York: Springer-Verlag. pp. 57–76. ISBN 3-540-40343-4.
  • Wickes, William E. (1968). "3.5. Veitch Diagrams". Logic Design with Integrated Circuits. New York, USA: John Wiley & Sons. pp. 36–49. LCCN 68-21185. p. 36: […] a refinement of the Venn diagram in that circles are replaced by squares and arranged in a form of matrix. The Veitch diagram labels the squares with the minterms. Karnaugh assigned 1s and 0s to the squares and their labels and deduced the numbering scheme in common use.
  • Maxfield, Clive "Max" (2006-11-29). "Reed-Muller Logic". Logic 101. EE Times. Part 3. from the original on 2017-04-19. Retrieved 2017-04-19.
  • Lind, Larry Frederick; Nelson, John Christopher Cunliffe (1977). "Section 2.3". Analysis and Design of Sequential Digital Systems. Macmillan Press. ISBN 0-33319266-4. (146 pages)
  • Holder, Michel Elizabeth (March 2005) [2005-02-14]. "A modified Karnaugh map technique". IEEE Transactions on Education. IEEE. 48 (1): 206–207. doi:10.1109/TE.2004.832879. eISSN 1557-9638. ISSN 0018-9359. S2CID 25576523. [2]
  • Cavanagh, Joseph (2008). Computer Arithmetic and Verilog HDL Fundamentals (1 ed.). CRC Press.
  • Kohavi, Zvi; Jha, Niraj K. (2009). Switching and Finite Automata Theory (3 ed.). Cambridge University Press. ISBN 978-0-521-85748-2.
  • Grund, Jürgen (2011). KV-Diagramme in der Schaltalgebra - Verknüpfungen, Beweise, Normalformen, schaltalgebraische Umformungen, Anschauungsmodelle, Paradebeispiele [KV diagrams in Boolean algebra - relations, proofs, normal forms, algebraic transformations, illustrative models, typical examples] (Windows/Mac executable or Adobe Flash-capable browser on CD-ROM) (e-book) (in German) (1 ed.). Berlin, Germany: viademica Verlag. ISBN 978-3-939290-08-7. (PDF) from the original on 2022-11-12. Retrieved 2022-11-26. [3] (282 pages with 14 animations)

External links Edit

  • Detect Overlapping Rectangles, by Herbert Glarner.
  • Using Karnaugh maps in practical applications, Circuit design project to control traffic lights.
  • K-Map Tutorial for 2,3,4 and 5 variables
  • Karnaugh Map Example
  • POCKET–PC BOOLEAN FUNCTION SIMPLIFICATION, Ledion Bitincka — George E. Antoniou
  • Solve Karnaugh maps online
  • K-Map troubleshoot

karnaugh, help, expand, this, article, with, text, translated, from, corresponding, article, german, february, 2018, click, show, important, translation, instructions, view, machine, translated, version, german, article, machine, translation, like, deepl, goog. You can help expand this article with text translated from the corresponding article in German February 2018 Click show for important translation instructions View a machine translated version of the German article Machine translation like DeepL or Google Translate is a useful starting point for translations but translators must revise errors as necessary and confirm that the translation is accurate rather than simply copy pasting machine translated text into the English Wikipedia Do not translate text that appears unreliable or low quality If possible verify the text with references provided in the foreign language article You must provide copyright attribution in the edit summary accompanying your translation by providing an interlanguage link to the source of your translation A model attribution edit summary is Content in this edit is translated from the existing German Wikipedia article at de Karnaugh Veitch Diagramm see its history for attribution You should also add the template Translated de Karnaugh Veitch Diagramm to the talk page For more guidance see Wikipedia Translation The Karnaugh map KM or K map is a method of simplifying Boolean algebra expressions Maurice Karnaugh introduced it in 1953 1 2 as a refinement of Edward W Veitch s 1952 Veitch chart 3 4 which was a rediscovery of Allan Marquand s 1881 logical diagram 5 6 aka Marquand diagram 4 but with a focus now set on its utility for switching circuits 4 Veitch charts are also known as Marquand Veitch diagrams 4 or rarely as Svoboda charts 7 and Karnaugh maps as Karnaugh Veitch maps KV maps An example Karnaugh map This image actually shows two Karnaugh maps for the function ƒ using minterms colored rectangles and for its complement using maxterms gray rectangles In the image E signifies a sum of minterms denoted in the article as m i displaystyle sum m i The Karnaugh map reduces the need for extensive calculations by taking advantage of humans pattern recognition capability 1 It also permits the rapid identification and elimination of potential race conditions clarification needed The required Boolean results are transferred from a truth table onto a two dimensional grid where in Karnaugh maps the cells are ordered in Gray code 8 4 and each cell position represents one combination of input conditions Cells are also known as minterms while each cell value represents the corresponding output value of the boolean function Optimal groups of 1s or 0s are identified which represent the terms of a canonical form of the logic in the original truth table 9 These terms can be used to write a minimal Boolean expression representing the required logic Karnaugh maps are used to simplify real world logic requirements so that they can be implemented using a minimum number of logic gates A sum of products expression SOP can always be implemented using AND gates feeding into an OR gate and a product of sums expression POS leads to OR gates feeding an AND gate The POS expression gives a complement of the function if F is the function so its complement will be F 10 Karnaugh maps can also be used to simplify logic expressions in software design Boolean conditions as used for example in conditional statements can get very complicated which makes the code difficult to read and to maintain Once minimised canonical sum of products and product of sums expressions can be implemented directly using AND and OR logic operators 11 Contents 1 Example 1 1 Construction 1 2 Grouping 1 3 Solution 1 4 Inverse 1 5 Don t cares 2 Race hazards 2 1 Elimination 2 2 2 variable map examples 3 Related graphical methods 4 See also 5 Notes 6 References 7 Further reading 8 External linksExample EditKarnaugh maps are used to facilitate the simplification of Boolean algebra functions For example consider the Boolean function described by the following truth table Truth table of a function A B C D f A B C D displaystyle f A B C D nbsp 0 0 0 0 0 01 0 0 0 1 02 0 0 1 0 03 0 0 1 1 04 0 1 0 0 05 0 1 0 1 06 0 1 1 0 17 0 1 1 1 08 1 0 0 0 19 1 0 0 1 110 1 0 1 0 111 1 0 1 1 112 1 1 0 0 113 1 1 0 1 114 1 1 1 0 115 1 1 1 1 0Following are two different notations describing the same function in unsimplified Boolean algebra using the Boolean variables A B C D and their inverses f A B C D m i i 6 8 9 10 11 12 13 14 displaystyle f A B C D sum m i i in 6 8 9 10 11 12 13 14 nbsp where m i displaystyle m i nbsp are the minterms to map i e rows that have output 1 in the truth table f A B C D M i i 0 1 2 3 4 5 7 15 displaystyle f A B C D prod M i i in 0 1 2 3 4 5 7 15 nbsp where M i displaystyle M i nbsp are the maxterms to map i e rows that have output 0 in the truth table nbsp K map drawn on a torus and in a plane The dot marked cells are adjacent nbsp K map construction Instead of the output values the rightmost values in the truth table this diagram shows a decimal representation of the input ABCD the leftmost values in the truth table therefore it is not a Karnaugh map nbsp In three dimensions one can bend a rectangle into a torus Construction Edit In the example above the four input variables can be combined in 16 different ways so the truth table has 16 rows and the Karnaugh map has 16 positions The Karnaugh map is therefore arranged in a 4 4 grid The row and column indices shown across the top and down the left side of the Karnaugh map are ordered in Gray code rather than binary numerical order Gray code ensures that only one variable changes between each pair of adjacent cells Each cell of the completed Karnaugh map contains a binary digit representing the function s output for that combination of inputs Grouping Edit After the Karnaugh map has been constructed it is used to find one of the simplest possible forms a canonical form for the information in the truth table Adjacent 1s in the Karnaugh map represent opportunities to simplify the expression The minterms minimal terms for the final expression are found by encircling groups of 1s in the map Minterm groups must be rectangular and must have an area that is a power of two i e 1 2 4 8 Minterm rectangles should be as large as possible without containing any 0s Groups may overlap in order to make each one larger The optimal groupings in the example below are marked by the green red and blue lines and the red and green groups overlap The red group is a 2 2 square the green group is a 4 1 rectangle and the overlap area is indicated in brown The cells are often denoted by a shorthand which describes the logical value of the inputs that the cell covers For example AD would mean a cell which covers the 2x2 area where A and D are true i e the cells numbered 13 9 15 11 in the diagram above On the other hand AD would mean the cells where A is true and D is false that is D is true The grid is toroidally connected which means that rectangular groups can wrap across the edges see picture Cells on the extreme right are actually adjacent to those on the far left in the sense that the corresponding input values only differ by one bit similarly so are those at the very top and those at the bottom Therefore AD can be a valid term it includes cells 12 and 8 at the top and wraps to the bottom to include cells 10 and 14 as is B D which includes the four corners Solution Edit nbsp Diagram showing two K maps The K map for the function f A B C D is shown as colored rectangles which correspond to minterms The brown region is an overlap of the red 2 2 square and the green 4 1 rectangle The K map for the inverse of f is shown as gray rectangles which correspond to maxterms Once the Karnaugh map has been constructed and the adjacent 1s linked by rectangular and square boxes the algebraic minterms can be found by examining which variables stay the same within each box For the red grouping A is the same and is equal to 1 throughout the box therefore it should be included in the algebraic representation of the red minterm B does not maintain the same state it shifts from 1 to 0 and should therefore be excluded C does not change It is always 0 so its complement NOT C should be included Thus C should be included D changes so it is excluded Thus the first minterm in the Boolean sum of products expression is AC For the green grouping A and B maintain the same state while C and D change B is 0 and has to be negated before it can be included The second term is therefore AB Note that it is acceptable that the green grouping overlaps with the red one In the same way the blue grouping gives the term BCD The solutions of each grouping are combined the normal form of the circuit is A C A B B C D displaystyle A overline C A overline B BC overline D nbsp Thus the Karnaugh map has guided a simplification of f 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 A B C D A C A B B C D displaystyle begin aligned f A B C D amp overline A BC overline D A overline B overline C overline D A overline B overline C D A overline B C overline D amp A overline B CD AB overline C overline D AB overline C D ABC overline D amp A overline C A overline B BC overline D end aligned nbsp It would also have been possible to derive this simplification by carefully applying the axioms of Boolean algebra but the time it takes to do that grows exponentially with the number of terms Inverse Edit The inverse of a function is solved in the same way by grouping the 0s instead nb 1 The three terms to cover the inverse are all shown with grey boxes with different colored borders brown A B gold A C blue BCDThis yields the inverse f A B C D A B A C B C D displaystyle overline f A B C D overline A overline B overline A overline C BCD nbsp Through the use of De Morgan s laws the product of sums can be determined f A B C D f A B C D A B A C B C D A B A C B C D A B A C B C D displaystyle begin aligned f A B C D amp overline overline f A B C D amp overline overline A overline B overline A overline C BCD amp left overline overline A overline B right left overline overline A overline C right left overline BCD right amp left A B right left A C right left overline B overline C overline D right end aligned nbsp Don t cares Edit nbsp The value of f A B C D displaystyle f A B C D nbsp for ABCD 1111 is replaced by a don t care This removes the green term completely and allows the red term to be larger It also allows blue inverse term to shift and become largerKarnaugh maps also allow easier minimizations of functions whose truth tables include don t care conditions A don t care condition is a combination of inputs for which the designer doesn t care what the output is Therefore don t care conditions can either be included in or excluded from any rectangular group whichever makes it larger They are usually indicated on the map with a dash or X The example on the right is the same as the example above but with the value of f 1 1 1 1 replaced by a don t care This allows the red term to expand all the way down and thus removes the green term completely This yields the new minimum equation f A B C D A B C D displaystyle f A B C D A BC overline D nbsp Note that the first term is just A not AC In this case the don t care has dropped a term the green rectangle simplified another the red one and removed the race hazard removing the yellow term as shown in the following section on race hazards The inverse case is simplified as follows f A B C D A B A C A D displaystyle overline f A B C D overline A overline B overline A overline C overline A D nbsp Through the use of De Morgan s laws the product of sums can be determined f A B C D f A B C D A B A C A D A B A C A D A B A C A D displaystyle begin aligned f A B C D amp overline overline f A B C D amp overline overline A overline B overline A overline C overline A D amp left overline overline A overline B right left overline overline A overline C right left overline overline A D right amp left A B right left A C right left A overline D right end aligned nbsp Race hazards EditElimination Edit Karnaugh maps are useful for detecting and eliminating race conditions Race hazards are very easy to spot using a Karnaugh map because a race condition may exist when moving between any pair of adjacent but disjoint regions circumscribed on the map However because of the nature of Gray coding adjacent has a special definition explained above we re in fact moving on a torus rather than a rectangle wrapping around the top bottom and the sides In the example above a potential race condition exists when C is 1 and D is 0 A is 1 and B changes from 1 to 0 moving from the blue state to the green state For this case the output is defined to remain unchanged at 1 but because this transition is not covered by a specific term in the equation a potential for a glitch a momentary transition of the output to 0 exists There is a second potential glitch in the same example that is more difficult to spot when D is 0 and A and B are both 1 with C changing from 1 to 0 moving from the blue state to the red state In this case the glitch wraps around from the top of the map to the bottom nbsp Race hazards are present in this diagram nbsp Above diagram with consensus terms added to avoid race hazards Whether glitches will actually occur depends on the physical nature of the implementation and whether we need to worry about it depends on the application In clocked logic it is enough that the logic settles on the desired value in time to meet the timing deadline In our example we are not considering clocked logic In our case an additional term of A D displaystyle A overline D nbsp would eliminate the potential race hazard bridging between the green and blue output states or blue and red output states this is shown as the yellow region which wraps around from the bottom to the top of the right half in the adjacent diagram The term is redundant in terms of the static logic of the system but such redundant or consensus terms are often needed to assure race free dynamic performance Similarly an additional term of A D displaystyle overline A D nbsp must be added to the inverse to eliminate another potential race hazard Applying De Morgan s laws creates another product of sums expression for f but with a new factor of A D displaystyle left A overline D right nbsp 2 variable map examples Edit The following are all the possible 2 variable 2 2 Karnaugh maps Listed with each is the minterms as a function of m textstyle sum m nbsp and the race hazard free see previous section minimum equation A minterm is defined as an expression that gives the most minimal form of expression of the mapped variables All possible horizontal and vertical interconnected blocks can be formed These blocks must be of the size of the powers of 2 1 2 4 8 16 32 These expressions create a minimal logical mapping of the minimal logic variable expressions for the binary expressions to be mapped Here are all the blocks with one field A block can be continued across the bottom top left or right of the chart That can even wrap beyond the edge of the chart for variable minimization This is because each logic variable corresponds to each vertical column and horizontal row A visualization of the k map can be considered cylindrical The fields at edges on the left and right are adjacent and the top and bottom are adjacent K Maps for four variables must be depicted as a donut or torus shape The four corners of the square drawn by the k map are adjacent Still more complex maps are needed for 5 variables and more nbsp Sm 0 K 0 nbsp Sm 1 K A B nbsp Sm 2 K AB nbsp Sm 3 K A B nbsp Sm 4 K AB nbsp Sm 1 2 K B nbsp Sm 1 3 K A nbsp Sm 1 4 K A B AB nbsp Sm 2 3 K AB A B nbsp Sm 2 4 K A nbsp Sm 3 4 K B nbsp Sm 1 2 3 K A B nbsp Sm 1 2 4 K A B nbsp Sm 1 3 4 K A B nbsp Sm 2 3 4 K A B nbsp Sm 1 2 3 4 K 1Related graphical methods EditFurther information Logic optimization Graphical methods Related graphical minimization methods include Marquand diagram 1881 by Allan Marquand 1853 1924 5 6 4 Veitch chart 1952 by Edward W Veitch 1924 2013 3 4 Svoboda chart 1956 by Antonin Svoboda 1907 1980 7 Mahoney map M map designation numbers 1963 by Matthew V Mahoney a reflection symmetrical extension of Karnaugh maps for larger numbers of inputs Reduced Karnaugh map RKM techniques from 1969 like infrequent variables map entered variables MEV variable entered map VEM or variable entered Karnaugh map VEKM by G W Schultz Thomas E Osborne Christopher R Clare J Robert Burgoon Larry L Dornhoff William I Fletcher Ali M Rushdi and others several successive Karnaugh map extensions based on variable inputs for a larger numbers of inputs Minterm ring map MRM 1990 by Thomas R McCalla a three dimensional extension of Karnaugh maps for larger numbers of inputs See also EditAlgebraic normal form ANF Binary decision diagram BDD a data structure that is a compressed representation of a Boolean function Espresso heuristic logic minimizer List of Boolean algebra topics Logic optimization Punnett square 1905 a similar diagram in biology Quine McCluskey algorithm Reed Muller expansion Venn diagram 1880 Zhegalkin polynomialNotes Edit This should not be confused with the negation of the result of the previously found function References Edit a b Karnaugh Maurice November 1953 1953 04 23 1953 03 17 The Map Method for Synthesis of Combinational Logic Circuits PDF Transactions of the American Institute of Electrical Engineers Part I Communication and Electronics 72 5 593 599 doi 10 1109 TCE 1953 6371932 Paper 53 217 Archived from the original PDF on 2017 04 16 Retrieved 2017 04 16 NB Also contains a short review by Samuel H Caldwell Curtis Herbert Allen 1962 A new approach to the design of switching circuits The Bell Laboratories Series 1 ed Princeton New Jersey USA D van Nostrand Company Inc ISBN 0 44201794 4 OCLC 1036797958 S2CID 57068910 ISBN 978 0 44201794 1 ark 13960 t56d6st0q viii 635 pages NB This book was reprinted by Chin Jih in 1969 a b Veitch Edward Westbrook 1952 05 03 1952 05 02 A Chart Method for Simplifying Truth Functions Transactions of the 1952 ACM Annual Meeting ACM Annual Conference Annual Meeting Proceedings of the 1952 ACM Annual Meeting Pittsburgh Pennsylvania USA New York USA Association for Computing Machinery ACM 127 133 doi 10 1145 609784 609801 a b c d e f g Brown Frank Markham 2012 2003 1990 Boolean Reasoning The Logic of Boolean Equations reissue of 2nd ed Mineola New York Dover Publications Inc ISBN 978 0 486 42785 0 1 a b Marquand Allan 1881 XXXIII On Logical Diagrams for n terms The London Edinburgh and Dublin Philosophical Magazine and Journal of Science 5 12 75 266 270 doi 10 1080 14786448108627104 Retrieved 2017 05 15 NB Quite many secondary sources erroneously cite this work as A logical diagram for n terms or On a logical diagram for n terms a b Gardner Martin 1958 6 Marquand s Machine and Others Logic Machines and Diagrams 1 ed New York USA McGraw Hill Book Company Inc pp 104 116 ISBN 1 11784984 8 LCCN 58 6683 ark 13960 t5cc1sj6b x 157 pages a b Klir George Jiri May 1972 Reference Notations to Chapter 2 Introduction to the Methodology of Switching Circuits 1 ed Binghamton New York USA Litton Educational Publishing Inc D van Nostrand Company p 84 ISBN 0 442 24463 0 LCCN 72 181095 C4463 000 3 xvi 573 1 pages Wakerly John F 1994 Digital Design Principles amp Practices New Jersey USA Prentice Hall pp 48 49 222 ISBN 0 13 211459 3 NB The two page sections taken together say that K maps are labeled with Gray code The first section says that they are labeled with a code that changes only one bit between entries and the second section says that such a code is called Gray code Belton David April 1998 Karnaugh Maps Rules of Simplification Archived from the original on 2017 04 18 Retrieved 2009 05 30 Dodge Nathan B September 2015 Simplifying Logic Circuits with Karnaugh Maps PDF The University of Texas at Dallas Erik Jonsson School of Engineering and Computer Science Archived PDF from the original on 2017 04 18 Retrieved 2017 04 18 Cook Aaron Using Karnaugh Maps to Simplify Code Quantum Rarity Archived from the original on 2017 04 18 Retrieved 2012 10 07 Further reading EditKatz Randy Howard 1998 1994 Contemporary Logic Design The Benjamin Cummings Publishing Company pp 70 85 doi 10 1016 0026 2692 95 90052 7 ISBN 0 8053 2703 7 Vingron Shimon Peter 2004 2003 11 05 Karnaugh Maps Switching Theory Insight Through Predicate Logic Berlin Heidelberg New York Springer Verlag pp 57 76 ISBN 3 540 40343 4 Wickes William E 1968 3 5 Veitch Diagrams Logic Design with Integrated Circuits New York USA John Wiley amp Sons pp 36 49 LCCN 68 21185 p 36 a refinement of the Venn diagram in that circles are replaced by squares and arranged in a form of matrix The Veitch diagram labels the squares with the minterms Karnaugh assigned 1s and 0s to the squares and their labels and deduced the numbering scheme in common use Maxfield Clive Max 2006 11 29 Reed Muller Logic Logic 101 EE Times Part 3 Archived from the original on 2017 04 19 Retrieved 2017 04 19 Lind Larry Frederick Nelson John Christopher Cunliffe 1977 Section 2 3 Analysis and Design of Sequential Digital Systems Macmillan Press ISBN 0 33319266 4 146 pages Holder Michel Elizabeth March 2005 2005 02 14 A modified Karnaugh map technique IEEE Transactions on Education IEEE 48 1 206 207 doi 10 1109 TE 2004 832879 eISSN 1557 9638 ISSN 0018 9359 S2CID 25576523 2 Cavanagh Joseph 2008 Computer Arithmetic and Verilog HDL Fundamentals 1 ed CRC Press Kohavi Zvi Jha Niraj K 2009 Switching and Finite Automata Theory 3 ed Cambridge University Press ISBN 978 0 521 85748 2 Grund Jurgen 2011 KV Diagramme in der Schaltalgebra Verknupfungen Beweise Normalformen schaltalgebraische Umformungen Anschauungsmodelle Paradebeispiele KV diagrams in Boolean algebra relations proofs normal forms algebraic transformations illustrative models typical examples Windows Mac executable or Adobe Flash capable browser on CD ROM e book in German 1 ed Berlin Germany viademica Verlag ISBN 978 3 939290 08 7 Archived PDF from the original on 2022 11 12 Retrieved 2022 11 26 3 282 pages with 14 animations External links EditKarnaugh map at Wikipedia s sister projects nbsp Definitions from Wiktionary nbsp Media from Commons nbsp News from Wikinews nbsp Quotations from Wikiquote nbsp Texts from Wikisource nbsp Textbooks from Wikibooks nbsp Resources from Wikiversity Detect Overlapping Rectangles by Herbert Glarner Using Karnaugh maps in practical applications Circuit design project to control traffic lights K Map Tutorial for 2 3 4 and 5 variables Karnaugh Map Example POCKET PC BOOLEAN FUNCTION SIMPLIFICATION Ledion Bitincka George E Antoniou Solve Karnaugh maps online K Map troubleshoot Retrieved from https en wikipedia org w index php title Karnaugh map amp oldid 1174182642 Veitch, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.