Jay Marz
Jay Marz

Reputation: 1912

How to understand this style of K-map

I have seen a different style of Karnaugh Map for logic design. This is the style they used: enter image description here

Anyone knows how this K-Map done? How to comprehend with this kind of map? Or how they derived from that equation from that map. The map is quite different from the common map like this: enter image description here

Upvotes: 3

Views: 1531

Answers (3)

Jasen
Jasen

Reputation: 12432

it's the same in principle just the rows and columns (or the variables) are in a different order

The red labels are for when the variable is true, the blue for when it's false

Upvotes: 1

Kit Ostrihon
Kit Ostrihon

Reputation: 834

The maps relate to each other this way, the only difference is the cells' (terms') indexes corresponding to the variables or the order of the variables.

The exclamation mark is only an alternative to the negation of a variable. !A is the same as ¬A, also sometimes noted A'.

       !A    A    A   !A            ↓CD\AB → 00   01   11   10
     +----+----+----+----+                 +----+----+----+----+
  !B |  1 |  0 |  1 |  0 | !D           00 |  1 |  1 |  1 |  0 |
     +----+----+----+----+                 +----+----+----+----+
   B |  1 |  1 |  1 |  1 | !D     ~     01 |  1 |  x |  x |  1 |
     +----+----+----+----+                 +----+----+----+----+
   B |  x |  x |  x |  x |  D           11 |  x |  x |  x |  x |
     +----+----+----+----+                 +----+----+----+----+
  !B |  1 |  1 |  x |  x |  D           10 |  0 |  1 |  1 |  1 |
     +----+----+----+----+                 +----+----+----+----+
       !C   !C    C    C  

If you are unsure, of the indexes in the given K-map, you can always check that by writing the corresponding truth-table.

For example the output value of the first cell in the "strange" K-map is equal to 1 if !A·!B·!C·!D (all variables in its negation), that corresponds with the first line of the truth-table, so the index is 0. And so on.

 index | A B C D | y
=======+=========+===
    0  | 0 0 0 0 | 1
    1  | 0 0 0 1 | 1
    2  | 0 0 1 0 | 0
    3  | 0 0 1 1 | x ~ 'do not care' state/output
-------+---------+---
    4  | 0 1 0 0 | 1
    5  | 0 1 0 1 | x
    6  | 0 1 1 0 | 1
    7  | 0 1 1 1 | x
-------+---------+---
    8  | 1 0 0 0 | 0
    9  | 1 0 0 1 | 1
   10  | 1 0 1 0 | 1
   11  | 1 0 1 1 | x
-------+---------+---
   12  | 1 1 0 0 | 1
   13  | 1 1 0 1 | x
   14  | 1 1 1 0 | 1
   15  | 1 1 1 1 | x

You can use the map the same way you would use the "normal" K-map to find the implicants (groups), because all K-maps indexing needs to conform to the Gray's code.

You can see the simplified boolean expression is the same in both styles of these K-maps:

f(A,B,C,D) = !A·!C + A·C + B + D = ¬A·¬C + A·C + B + D
  • !A·!C is marked red,
  • A·C blue,
  • B orange
  • and D green.

Different styles of Karnaugh maps

The K-maps were generated using latex's \karnaughmap command and tikz library.

Upvotes: 1

Ghada
Ghada

Reputation: 193

It's actually the same map, but instead of A they have C and instead of B they have A and instead of C they have D and instead of D they have B

Upvotes: 0

Related Questions