Using Karnaugh Maps For This Function

  • MHB
  • Thread starter shamieh
  • Start date
  • Tags
    Function
In summary, you can generate a Karnaugh map by drawing a table of all 1's in the column corresponding to the row number, and group together any 1's that are adjacent to each other. You can then read the SOP and POS forms from the K-map.
  • #1
shamieh
539
0
Find the minimum cost sum of products and product of sums forms for the function : $f$(x1,x2,x3 = \(\displaystyle \sum\)m(1,2,3,5)

I need to use Karnaugh Maps. How do I do this with a Karnaugh map, I understand how to get the rows and columns with a K map. But i don;t understand after that.
 
Technology news on Phys.org
  • #2
shamieh said:
Find the minimum cost sum of products and product of sums forms for the function : $f$(x1,x2,x3 = \(\displaystyle \sum\)m(1,2,3,5)
How do you measure cost?

shamieh said:
I need to use Karnaugh Maps. How do I do this with a Karnaugh map, I understand how to get the rows and columns with a K map. But i don;t understand after that.
Could you explain more precisely what you understand and what you don't? You know how to get the rows and columns of what? Can you post (or at least describe) the Karnaugh map for this function?
 
  • #3
Please delete this post. I have created another, with a more details to question on a particular K-map problem. Please void this post.
 
  • #4
shamieh said:
Please delete this post. I have created another, with a more details to question on a particular K-map problem. Please void this post.

I think it would be best to leave this topic, so that when you get your other question answered, you may want to revisit this topic and show what you learned by completing this question here for the benefit of our readers.
 
  • #5
Figured out how to use K-Maps! Can anyone check my work?

:D finally figured out how to use K-maps!

Can anyone check my work? Want to make sure I am doing it the right way.

Find the minimum cost Sum of Product form for the function $f$(x1,x2,x3) = \(\displaystyle \sum\)m(1,2,3,5)

I got x3x4! + x1!x2! Is this correct?

Thank you for your time,
Sham
 
  • #6
Re: Figured out how to use K-Maps! Can anyone check my work?

shamieh said:
:D finally figured out how to use K-maps!

Can anyone check my work? Want to make sure I am doing it the right way.

Find the minimum cost Sum of Product form for the function $f$(x1,x2,x3) = \(\displaystyle \sum\)m(1,2,3,5)

I got x3x4! + x1!x2! Is this correct?

Thank you for your time,
Sham

Since this is the same question originally posted in this topic, I have merged the two topics to avoid redundancy.
 
  • #7
Re: Figured out how to use K-Maps! Can anyone check my work?

shamieh said:
:D finally figured out how to use K-maps!

Can anyone check my work? Want to make sure I am doing it the right way.

Find the minimum cost Sum of Product form for the function $f$(x1,x2,x3) = \(\displaystyle \sum\)m(1,2,3,5)

I got x3x4! + x1!x2! Is this correct?

Thank you for your time,
Sham

Where did the $x_4$ come from? I get $\bar{x}_1 x_2+\bar{x}_2 x_3$.
 
  • #8
Re: Figured out how to use K-Maps! Can anyone check my work?

Ackbach said:
Where did the $x_4$ come from? I get $\bar{x}_1 x_2+\bar{x}_2 x_3$.

Wait a minute, I'm an idiot. Was writing down the wrong numbers and was looking at another problem, let me re-work the problem.
 
  • #9
Find the minimum cost SOP and POS forms for the function $f$(x1,x2,x3,x4) = M(0,1,2,4,5,7,8,9,10,12,14,15)

by Truth table I put all 1's in the spot of the numbers. drew a karnaugh map and got

my KMAP
  1. 1 1 1 1 <---I grouped these 4 1's horizontally..Ialso grouped the 2 1s vertically.
  2. 1 1 0 1 <-- I grouped the 4 1's from the 1st and second row.
  3. 0 1 1 0 <---- I grouped 2 1s horizontally
  4. 1 0 1 1 <--- grouped 2 1s horizontally.
 
  • #10
Here is the Karnaugh map for ∑m(1,2,3,5).

karnaugh1.png


(Yay, I learned to generate images with transparent background!)

shamieh said:
Find the minimum cost SOP and POS forms for the function $f$(x1,x2,x3,x4) = M(0,1,2,4,5,7,8,9,10,12,14,15)

by Truth table I put all 1's in the spot of the numbers. drew a karnaugh map and got

my KMAP
  1. 1 1 1 1 <---I grouped these 4 1's horizontally..Ialso grouped the 2 1s vertically.
  2. 1 1 0 1 <-- I grouped the 4 1's from the 1st and second row.
  3. 0 1 1 0 <---- I grouped 2 1s horizontally
  4. 1 0 1 1 <--- grouped 2 1s horizontally.
The K-map is correct. Now you need to write the SOP and POS forms. Note that for POS you look at 0's in the K-map and the convention for writing maxterms is the opposite from that for minterms: 0 for a variable means no negation; 1 means negation.

http://www.ee.calpoly.edu/media/uploads/resources/KarnaughExplorer_1.html is a nice online K-map generator. However, it only shows minimal SOP forms.
 
  • #11
Wow I love you. Can I ask you a question. Suppose I am grouping and I had a pair of 1 & d next to each other.. I noticed on this particular problem my teacher gave us, he didn't group that pair, and thus; left out a term. My question is, if there is a grouping to be made of 1's. Why would you not make that grouping? Because that d can just be a 1 right? So why not group that? Wouldn't it minimize your cost? Isn't that the whole point! To find all groupings? Otherwise aren't you missing something? Example Below. We are dealing with Sum of Products by the way just FYI.. NOTE: The x's are my don't cares or "d"s

View attachment 1402
 

Attachments

  • KMAP.png
    KMAP.png
    7.1 KB · Views: 54
Last edited:
  • #12
Also, another question..When we are solving using a K-map for the Product of Sums do we evaluate our K-Map the exact same way except group the 0s? Or do we evaluate it differently?
 
  • #13
shamieh said:
Wow I love you. Can I ask you a question. Suppose I am grouping and I had a pair of 1 & d next to each other.. I noticed on this particular problem my teacher gave us, he didn't group that pair, and thus; left out a term. My question is, if there is a grouping to be made of 1's. Why would you not make that grouping?

It isn't always advantageous to make a 'd' a '1'. Clumping on K-maps works like this: they always have to be contiguous rectangles (they can wrap around, both horizontally and vertically), where the height and width are powers of 2. In your case, the 'd' in the $ABCD$ location allows you to form the more efficient term $BC$. However, the 'd' in the $ \bar{A} \bar{B}C \bar{D}$ position does not allow you to form a contiguous rectangle of width a power of 2 and height a power of 2 that includes any ones you can't already get from a different grouping. That is, the '1' in the $\bar{A} \bar{B} \bar{C} \bar{D}$ position you've already got from $\bar{B} \bar{C} \bar{D}$, and the '1' in the $\bar{A}BC \bar{D}$ position you've already gotten from the $BC$ term.

Because that d can just be a 1 right? So why not group that? Wouldn't it minimize your cost? Isn't that the whole point! To find all groupings? Otherwise aren't you missing something? Example Below. We are dealing with Sum of Products by the way just FYI.. NOTE: The x's are my don't cares or "d"s

View attachment 1402

shamieh said:
Also, another question..When we are solving using a K-map for the Product of Sums do we evaluate our K-Map the exact same way except group the 0s? Or do we evaluate it differently?

I'll let the master, Evgeny.Makarov, answer that one, as I have no experience forming PoS from K-maps.
 
  • #14
Cool. I see now. I also found the answer out to my other question. Apparently you group all the zeros, but when you are evaluating, if you have 00 00 for example..and you have WXYZ for example... Instead of WXYZ (which you would put in a SOP form Kmap) you just read W!X!Y!Z! in a POS form kmap. Really pretty simple actually.
 
  • #15
shamieh said:
Suppose I am grouping and I had a pair of 1 & d next to each other.. I noticed on this particular problem my teacher gave us, he didn't group that pair, and thus; left out a term.
Leaving out minterms is the whole point; it makes the resulting Boolean expression smaller. I agree with Adrian's explanation. If grouping a d with 1's leads to a bigger group (and thus smaller minterm) whose width and height are powers of 2, then it's a good thing; otherwise it's better to leave it as 0.

shamieh said:
Apparently you group all the zeros, but when you are evaluating, if you have 00 00 for example..and you have WXYZ for example... Instead of WXYZ (which you would put in a SOP form Kmap) you just read W!X!Y!Z! in a POS form kmap.
Yes, you group zeros, but the rest is the other way around. With a SOP, 0 means a negation, so 0000 produces W!X!Y!Z!. With a POS, 1 means a negation, and besides terms are sums (it's a Product Of Sums). So, with a POS, 0000 produces W + X + Y + Z.

Basically, in constructing a POS, everything is dual compared to a SOP: instead of 1's in a truth table and a K-map, you look at 0's; instead of products, terms are sums, and instead of negations, 0's correspond to simple variables.
 

FAQ: Using Karnaugh Maps For This Function

How do Karnaugh maps help in simplifying Boolean functions?

Karnaugh maps provide a visual representation of a Boolean function, making it easier to identify patterns and minimize the number of terms in the function. This simplifies the logic and reduces the complexity of the function.

What are the advantages of using Karnaugh maps over other methods of simplification?

Karnaugh maps are easy to use and require minimal calculations, making them a more efficient method of simplifying Boolean functions. They also provide a systematic approach to identifying and grouping terms, resulting in a simplified and more optimized function.

Can Karnaugh maps be used for any Boolean function?

Yes, Karnaugh maps can be used to simplify any Boolean function, regardless of its complexity. However, they are most useful for functions with 4 or fewer variables.

How can Karnaugh maps be extended to handle more than 4 variables?

Karnaugh maps can be extended by using multiple maps, where each map represents a different combination of variables. This method is known as the Quine-McCluskey algorithm and is commonly used to simplify functions with more than 4 variables.

Are there any limitations to using Karnaugh maps?

One limitation of Karnaugh maps is that they can become complex and difficult to read when dealing with functions with many variables. Additionally, they can only be used for simplification and not for finding the most optimized solution for a function.

Similar threads

Replies
4
Views
3K
Replies
1
Views
2K
Replies
26
Views
3K
Replies
5
Views
3K
Replies
5
Views
2K
Replies
2
Views
2K
Replies
22
Views
3K
Back
Top