Khaloscar
Khaloscar

Reputation: 1

How do I correctly describe this 4x4 square in my K-map?

I am trying to find a (SoP)-expression using the embedded K-map. I have a box of size 4x4 which is a permitted use however I am having a hard time understanding how I could implement it.

To me the 4x4 box represents that the output is always 1 independet on any of the variables. Then I'd like to use the 2x4 box to the right and produce: 1 OR (Qc AND !Qd), but this does not produce the correct result.

I can see several alternative ways to produce the correct result. My questions are specifically:

  1. Why can't I use the 4x4 box, or perhaps, how do I represent it correctly?
  2. How do I know when I can represent parts of the output as a 4x4 box?

Perhaps Im missing something more fundamental. Thx in advance.

enter image description here

Upvotes: 0

Views: 209

Answers (1)

Progman
Progman

Reputation: 19555

The point of placing rectangles in a K-map is to eliminate variables from an expression. When the result of a rectangle is the same for the variable values X and X', then the variable X is not needed and can be removed. You do this by extending an existing rectangle by doubling the size and eliminating exactly one variable, where every other variable stays the same. For the common/normal K-map with four variables this works with every such rectangle because in a way the columns/rows are labelled/positioned. See the following example:

normal K-Map with four variables

The rectangle has eliminated the variables A and B, one variable at a time when the size of the rectangle has been extended/doubled. This results in the function F(A,B,C,D) = C'D'. But check the following K-map of four variables:

different K-Map with four variables

Notice that the columns for the D variable has been changed (resulting in a different function overall). When you try to extend the red rectangle to catch the other two 1 values as well, you are eliminating two variables at the same time (B and D). As you cannot grow the rectangle anymore, you are left with two rectangles, resulting in the function F(A,B,C,D) = BC'D' + B'C'D (which can be simplified to C' * (BD' + B'D)).

The practice in placing rectangles in the K-map isn't just placing the biggest rectangle possible, but to eliminate variables in the right way. To answer your questions, you can always start with the smallest rectangle and extend/double its size to eliminate one variable. See the following example:

K-map with six variables

The green rectangle grows in these steps:

  1. Start with A'BC'D'E
  2. Eliminate the (only) variable A by growing "down", resulting in BC'D'E
  3. Eliminate the (only) variable D by growing "right", resulting in BC'E.

But now, the rectangle cannot grow/double its size anymore because that would eliminate the variable E, but also somehow eliminate the variable C. You cannot eliminate the variable E, because you have 0 values to the left of the green rectangle and 1 values to the right of the green rectangle (all in the left half of the K-map, where you have the value C'). The only way to increase/grow the rectangle is to get the "don't care" values to eliminate the B variable (not shown here).

The overall function for this K-map would be F(A,B,C,D,E) = C'E + DE' + CD' (from three 2x4 rectangles).

Upvotes: 0

Related Questions