Here is what happens when there are more than 4 input variables. Basically, you get to play 3-dimensional chess ... the first Kmap essentially sits on top of the second. For example, in the figure below, the 16 squares of the first map are where A is high, and the second 16 squares are where A is low. Suppose we have the equation A*!B*!E + !A*!B*!D*E + A*B*D*E + !A*!B*C*!D + A*!B*C*E + !A*B*D*E T1 T2 T3 T4 T5 T6 (I have numbered each term T1-T6, so you can see on the maps where they go.) Here is the filled-out Kmap. A | B +-------------+-------------+ | T1 | T1 | | | |------+------+------+------+--- | | T5 | | | ---+------+------+------+------| E | | T5 | T3 | T3 | D |------+------+------+------+--- | T1 | T1 | | | +------+-------------+------+ | C | !A | B +-------------+-------------+ | | T4 | | | |------+------+------+------+--- | T2 | T2,T4| | | ---+------+------+------+------| E | | | T6 | T6 | D |------+------+------+------+--- | | | | | +------+-------------+------+ | C | Remember, since the A plane sits on top of the !A plane, we have to remember to look for Prime Implicants that cross planes as well as lie within a plane. So, for example, there is a Prime Implicant that includes both T3 and T6, giving the term B*D*E ... The total set of prime implicants in this diagram are A*!B*!E + A*!B*C + !A*!B*!D*E + !B*C*!D + B*D*E The first term (A*!B*!E) is the four T1's in the A plane The second term (A*!B*C) is the vertical group in the A plane consisting of the two T5's and the two T1's next to them The third term (!A*!B*!D*!E) is the two T2's in the !A plane The fourth term (!B*C*!D) is the the two T4's in the !A plane and the T1 and T5 directly above them (in the A plane) The fifth term (B*D*E) is the two T6's in the !A plane and the two T3's directly above them in the A plane