Welcome. I would like to ask about solving Karnaugh Maps, especially grouping 5-variables map. I am not sure if I made this good way, so if you could, please let me know what is wrong. It seems to me everything is fine.

Actually, is there any good Karnaugh map solver which work with 5 variables as well?

Here is map: Karnaugh map

  • 1
    \$\begingroup\$ Here is a link to a karnaugh map solver ( 32x8.com ) . According to this website, your result equation is wrong \$\endgroup\$
    – M.Ferru
    Aug 2, 2016 at 9:32
  • \$\begingroup\$ But what is wrong with it? How should I merge minterms? \$\endgroup\$
    – rusiano
    Aug 2, 2016 at 9:35
  • \$\begingroup\$ For example, in the blue group, neither C, D or E keep the same value. So what you cannot group them together. As you can see, the resulting blue equation is wrong. A=0, B=1, C=1, D=1 and E=0 must result 1 (from the table) but with your equation, it's 0 \$\endgroup\$
    – M.Ferru
    Aug 2, 2016 at 9:55
  • \$\begingroup\$ Because of the mirror red line, you cannot take the blue group. You have to split it into 2 groups of two. You can refer to this website ( allaboutcircuits.com/textbook/digital/chpt-8/… ) \$\endgroup\$
    – M.Ferru
    Aug 2, 2016 at 10:02
  • \$\begingroup\$ The answer should be [C.D'.E' + A'.B.C'.E + A'.B.D.E'] Given that F(4, 9, 10, 11, 12, 14, 20, 28) = 1 \$\endgroup\$
    – Elbehery
    Aug 2, 2016 at 10:19

2 Answers 2


This answer is correct ?

Your answer is NOT correct; This is not the proper way to group a 5 variables K-map

Lets first look why a K-map is not practical for functions with more than 4 variables

The way the K-Map works is by grouping the numbers that their binary representation has a Hamming distance = 1 [Only 1 bit difference]

In the image you posted

enter image description here

This doesnt seem like the only way to arrange the values of inputs C,D,E since '011' is not next to '111'. We cant put all the values of a HD=1 of 3-bits on a line [1-D]

Having 2-bits guarantees that you can arrange the values of the 2 inputs in a 1-D [Line] such that all the binary values are surrounded by all the other values of hamming distance = 1 bit, but more than 2 bits require a 2-D or more in order to make sure that all the binary values are surrounded by all the possible values of a hamming distance = 1 bit

Thats why the way you are taking the groups is not correct

You might want to check This PDF

What is the correct answer?

According to my Python script which uses Quine–McCluskey algorithm, the correct answer is

enter image description here

What tools can i use to solve K-Map or to reduce a Boolean equation

  1. You can use my python script i provided above [Its a terrible code BUT works]
  2. You can use This tool to solve up to 8 variables K-Map
  3. You can use Logic Friday
  • \$\begingroup\$ Thank you. I wanted to know about grouping and so on, so I will check pdf which you mentioned. \$\endgroup\$
    – rusiano
    Aug 2, 2016 at 11:33

Can check out this k-map solver. It can solve more than 9-bit k-maps too!! Minterm and Don't care terms input, and output of SOP, VHDL & Verilog code snippets.

It has a great representation of the matrix too.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.