From WikiChip
Difference between revisions of "karnaugh map"

(Map Cell Numbering: +images +table)
Line 52: Line 52:
  
 
=== Map Cell Numbering ===
 
=== Map Cell Numbering ===
Sometimes the individual cells are numbered in accordance with their [[minterm]] index. Strictly speaking this is unnecessary, but it may be useful in various situations when working with [[minterm]]s and [[maxterm]]s. Cell numbering are usually written in one of the cell corners.
+
{| class="wikitable" style="float: right;"
 +
! colspan="3" | Inputs || colspan="2" | [[Minterm]]s || colspan="2" | [[Maxterm]]s
 +
|-
 +
! A !! B !!  !! [[Minterm]]s !! Index !! [[Maxterm]]s !! Index
 +
|-
 +
| 0 || 0 || || <math>\bar A \bar B</math> || <math>m_0</math> || <math>A+B</math> || <math>M_0</math>
 +
|-
 +
| 0 || 1 || || <math>\bar A B</math> || <math>m_1</math> || <math>A+\bar B</math> || <math>M_1</math>
 +
|-
 +
| 1 || 0 || || <math>A \bar B</math> || <math>m_2</math> || <math>\bar A+B</math> || <math>M_2</math>
 +
|-
 +
| 1 || 1 || || <math>AB</math> || <math>m_3</math> || <math>\bar A + \bar B</math> || <math>M_3</math>
 +
|-
 +
! A !! B !! C !! [[Minterm]]s !! Index !! [[Maxterm]]s !! Index
 +
|-
 +
| 0 || 0 || 0 || <math>\bar A \bar B \bar C</math> || <math>m_0</math> || <math>A+B+C</math> || <math>M_0</math>
 +
|-
 +
| 0 || 0 || 1 || <math>\bar A \bar B C</math> || <math>m_1</math> || <math>A+B+\bar C</math> || <math>M_1</math>
 +
|-
 +
| 0 || 1 || 0 || <math>\bar AB \bar C</math> || <math>m_2</math> || <math>A+\bar B + C</math> || <math>M_2</math>
 +
|-
 +
| 0 || 1 || 1 || <math>\bar A BC</math> || <math>m_3</math> || <math>A+\bar B+\bar C</math> || <math>M_3</math>
 +
|-
 +
| 1 || 0 || 0 || <math>A \bar B \bar C</math> || <math>m_4</math> || <math>\bar A+B+C</math> || <math>M_4</math>
 +
|-
 +
| 1 || 0 || 1 || <math>A \bar B C</math> || <math>m_5</math> || <math>\bar A+B+\bar C</math> || <math>M_5</math>
 +
|-
 +
| 1 || 1 || 0 || <math>AB \bar C</math> || <math>m_6</math> || <math>A+B+\bar C</math> || <math>M_6</math>
 +
|-
 +
| 1 || 1 || 1 || <math>ABC</math> || <math>m_7</math> || <math>\bar A+\bar B+\bar C</math> || <math>M_7</math>
 +
|}
 +
Sometimes the individual cells are numbered in accordance with their [[minterm]] and [[maxterm]] indices. Strictly speaking this is unnecessary, but it may be useful in various situations when working with [[minterm]]s and [[maxterm]]s. Cell numbering are usually written in one of the cell corners.
 +
 
 +
{| style="width: 500px; text-align: center"
 +
! 1-Variable K-map !! 2-Variables K-map
 +
|-
 +
| [[File:kmap (numbering) (1 var).svg|125px]] || [[File:kmap (numbering) (2 vars).svg|150px]]
 +
|-
 +
! 3-Variables K-map !! 4-Variables K-map
 +
|-
 +
| [[File:kmap (numbering) (3 vars).svg|200px]] || [[File:kmap (numbering) (4 vars).svg|200px]]
 +
|}

Revision as of 15:16, 9 December 2015

3-input MAJ gate kmap.svg
3-input MAJ gate
Equation StartLayout 1st Row 1st Column f left-parenthesis a comma b comma c right-parenthesis equals 2nd Column upper A upper B plus upper A upper C plus upper B upper C 2nd Row 1st Column equals 2nd Column sigma-summation m left-parenthesis 3 comma 5 comma 6 comma 7 right-parenthesis 3rd Row 1st Column f prime left-parenthesis a comma b comma c right-parenthesis equals 2nd Column product upper M left-parenthesis 0 comma 1 comma 2 comma 4 right-parenthesis EndLayout

Marnaugh Map (K-map) is a graphical tool that provides a simple and straightforward method of minimizing Boolean expressions. The K-map method was introduced in 1953 by Maurice Karnaugh as an enhancement to Veitch diagram.

Format

Map Formats

A K-map is a square or rectangle divided into a number of smaller squares called cells. Each cell on the K-Map corresponds directly to a line in a truth table. There are always Equation 2 Superscript n cells in a K-Map where Equation n is the number of variables in the function. Below are the usual formats for 1-4 variable k-maps (larges k-maps are discussed later on).

1-Variable K-map 2-Variables K-map
kmap (no labels) (1 var).svg kmap (no labels) (2 vars).svg
3-Variables K-map 4-Variables K-map
kmap (no labels) (3 vars).svg kmap (no labels) (4 vars).svg

Map Labeling

The coordinates of the cells in a K-map are the input value combinations from the truth table. There are a number of common ways to label a K-map. The two most common methods are numerically and by variables and their complements. There are advantages to both. Regardless of which way you choose, the coordinates of two adjacent cells differ by only one variable - i.e. only one 0 can switch to a 1 and vice versa between two adjacent cells. For example, consider a function with 2 variables, the order by which you list them would be Equation 00 comma 01 comma 11 comma 10 . Note how 11 and 10 were switched so that only one value is different.

Numerically Variables
1-Variable K-map
kmap (1 var).svg kmap (labels) (1 var).svg
2-Variables K-map
kmap (2 vars).svg kmap (labels) (2 vars).svg
3-Variables K-map
kmap (3 vars).svg kmap (labels) (3 vars).svg
4-Variables K-map
kmap (4 vars).svg kmap (labels) (4 vars).svg

Map Cell Numbering

Inputs Minterms Maxterms
A B Minterms Index Maxterms Index
0 0 Equation upper A overbar upper B overbar Equation m 0 Equation upper A plus upper B Equation upper M 0
0 1 Equation upper A overbar upper B Equation m 1 Equation upper A plus upper B overbar Equation upper M 1
1 0 Equation upper A upper B overbar Equation m 2 Equation upper A overbar plus upper B Equation upper M 2
1 1 Equation upper A upper B Equation m 3 Equation upper A overbar plus upper B overbar Equation upper M 3
A B C Minterms Index Maxterms Index
0 0 0 Equation upper A overbar upper B overbar upper C overbar Equation m 0 Equation upper A plus upper B plus upper C Equation upper M 0
0 0 1 Equation upper A overbar upper B overbar upper C Equation m 1 Equation upper A plus upper B plus upper C overbar Equation upper M 1
0 1 0 Equation upper A overbar upper B upper C overbar Equation m 2 Equation upper A plus upper B overbar plus upper C Equation upper M 2
0 1 1 Equation upper A overbar upper B upper C Equation m 3 Equation upper A plus upper B overbar plus upper C overbar Equation upper M 3
1 0 0 Equation upper A upper B overbar upper C overbar Equation m 4 Equation upper A overbar plus upper B plus upper C Equation upper M 4
1 0 1 Equation upper A upper B overbar upper C Equation m 5 Equation upper A overbar plus upper B plus upper C overbar Equation upper M 5
1 1 0 Equation upper A upper B upper C overbar Equation m 6 Equation upper A plus upper B plus upper C overbar Equation upper M 6
1 1 1 Equation upper A upper B upper C Equation m 7 Equation upper A overbar plus upper B overbar plus upper C overbar Equation upper M 7

Sometimes the individual cells are numbered in accordance with their minterm and maxterm indices. Strictly speaking this is unnecessary, but it may be useful in various situations when working with minterms and maxterms. Cell numbering are usually written in one of the cell corners.

1-Variable K-map 2-Variables K-map
kmap (numbering) (1 var).svg kmap (numbering) (2 vars).svg
3-Variables K-map 4-Variables K-map
kmap (numbering) (3 vars).svg kmap (numbering) (4 vars).svg