booleanboolean-logickarnaugh-map

Which Variables go on which side of a Karnaugh Map


For a Karnaugh map of three or more variables deciding which side the variables go makes the solution easier to spot and simpler. But how do you know which side which variables go on.

eg. For variables x, y and z; You could have x and y as column headers and z as a row header or you could have y and z as column headers and x as a row header which would give two different tables


Solution

  • For maps with up to four variables, it is a matter of taste, which variable is put at which side. However, Mahoney maps as extension of Karnaugh maps for five and more variables do require a certain ordering along the side.

    Expression for the following examples:

    abcd!e + abc!de

    Five-input Mahoney map:

    enter image description here

    Equivalent Karnaugh map:

                de                     de
          00  01  11  10         00  01  11  10
     abc +---+---+---+---+  abc +---+---+---+---+
     000 | 0 | 0 | 0 | 0 |  001 | 0 | 0 | 0 | 0 |
         +---+---+---+---+      +---+---+---+---+
     010 | 0 | 0 | 0 | 0 |  011 | 0 | 0 | 0 | 0 |
         +---+---+---+---+      +---+---+---+---+
     110 | 0 | 0 | 0 | 0 |  111 | 0 | 1 | 0 | 1 |
         +---+---+---+---+      +---+---+---+---+
     100 | 0 | 0 | 0 | 0 |  101 | 0 | 0 | 0 | 0 |
         +---+---+---+---+      +---+---+---+---+
    

    It is always possible to swap variables as shown here:

    enter image description here

               de                     de
          00  01  11  10         00  01  11  10
     abc +---+---+---+---+  abc +---+---+---+---+
     000 | 0 | 0 | 0 | 0 |  001 | 0 | 0 | 0 | 0 |
         +---+---+---+---+      +---+---+---+---+
     010 | 0 | 0 | 0 | 0 |  011 | 0 | 0 | 0 | 0 |
         +---+---+---+---+      +---+---+---+---+
     110 | 0 | 0 | 0 | 0 |  111 | 0 | 1 | 0 | 1 |
         +---+---+---+---+      +---+---+---+---+
     100 | 0 | 0 | 0 | 0 |  101 | 0 | 0 | 0 | 0 |
         +---+---+---+---+      +---+---+---+---+
    

    Here you can find a nice online-tool to draw and simplify Karnaugh-Veitch/Mahoney maps.