Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

karnaugh diagram

Status
Not open for further replies.

tintincute

New Member
hi
i would like to know how this karnaug diagram works? i'm quite confused how the tables are made.
i've seen some examples in the internet but the explanation is quite difficult to understand.
is there a simple way how to understand it?
thanks
regards
tintincute
 
yes Kryten i've read it already. hmm i think i will read it again. and if i don't understand it then i'll ask again. thanks for your reply ;-)
 
Last edited:
The wiki article does a pretty good job at explaining it. What about the tables confuse you? If you have two variables/inputs you have a 2x2, three variables/inputs = 2x4, four inputs = 4x4, etc.
 
hi again

i think i need a simplified explanation regarding Karnaugh Diagram. hope you don't mind Kryten

thanks & regards
 
A Karnaugh map (K-map) is a tool used for simplifying logic circuits. In order to complete the K-map, you need to know the requirements of your logic circuit. In other words, how many inputs will your circuit have and what is the desired output for each combination of inputs. First thing you need to do is create a truth table for your circuit. I'm assuming you already know how to do this, if not let me know and I can explain.

For example, let's say your design has three inputs and you want the output of your circuit to be logic '1' whenever bit 0 and bit 1 are high and bit 1 and bit 2 are high regardless of the remaining bit, and logic '0' for all other input combinations. Your truth table would look like this:

bit 2 | bit 1 | bit 0 | Q (output)
0.........0........0.........0
0.........0........1.........0
0.........1........0.........0
0.........1........1.........1
1.........0........0.........0
1.........0........1.........0
1.........1........0.........1
1.........1........1.........1

Now you can use a K-map to get the most simplified logic circuit that will realize this truth table. As I stated in my previous post, three inputs require a 2x4 K-map. Bit 2 = 'A', bit 1 = 'B', bit 0 = 'C', and your output (Q) = f (A,B,C). You should now be able to follow the wiki example and plug these values into your 3-variable K-map to get your simplified circuit. To help you out a bit more, the resultant logic circuit will consist of two 2-input AND gates and one 2-input OR gate. Let me know if you have further questions, and I will be glad to help you out more.
 
Last edited:
UHF network detector

HI , PEACE FOR ALL ; please help me to built an uhf network detector with directive antenna . to detetrmin a cow in the mountain .
thak you for your help
 
hi mossman77 how are you? thank you for taking your time to explain the Karnaugh Diagram.
i have a question in your example here:

"For example, let's say your design has three inputs and you want the output of your circuit to be logic '1' whenever bit 0 and bit 1 are high and bit 1 and bit 2 are high regardless of the remaining bit, and logic '0' for all other input combinations. Your truth table would look like this:"

does this mean that you have to assign values for your design?

i'm still confuse how to plot this on the table?
how does a 2x4 K-map look like?
is my table correct on the attachment?
thank you again.
 

Attachments

  • tablekarnaugh.jpg
    tablekarnaugh.jpg
    7.4 KB · Views: 252
additional question, how do you assign where to put the numbers in the box? I think it's not in order right?
in what I have learned, if there is a box 2x2

the first part - will look like this : 11, 10
the 2nd part - will look like this : 01, 00

are there basis for this?
how about if the box is 3x2?

thanks
 
A Karnaugh map will not resolve circuits containing exclusive gates such as XOR and XNORs, resulting only in a checkerboard pattern.

Dean
 
additional question, how do you assign where to put the numbers in the box? I think it's not in order right?
in what I have learned, if there is a box 2x2

the first part - will look like this : 11, 10
the 2nd part - will look like this : 01, 00

are there basis for this?

The "order" is "grey code" meaning only one bit can change in success .. so for 2 var's
00 01 11 10

for 3 vars: 000 001 011 010 110 111 101 100

for 4 vars: 0000 0001 0011 0010 0110 0111 0101 0100 1100 1101 1111 1110 1010 1011 1001 1000

how about if the box is 3x2?

The size of the Karnaugh map with n boolean variables is determined by 2^n, so 6 is not going to be result, ever :), but if you asked about 3 variables (2x4 map) or 4 variables (4x4 map) you have the sequence above
 
hello arhi
thanks for the input. so gray code is the order.
you wrote the sequence. should it always be in order like this or can i interchange it?

thanks
 
hi again
i'm having problem now in solving this one. I would like to put this boolean expression in a KV Diagram but I don't know how.

What I did, I made this table of A, B, C, D and then I don't know now how to proceed.
any ideas what would be my next step?

thanks

S= !A * C * !D * !B + !A * C * D * B

D C B A
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1
0 1 1 0
0 1 1 1
1 0 0 1
1 0 1 0
1 0 1 1
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1

thanks in advance
 

Attachments

  • KV.gif
    KV.gif
    3.6 KB · Views: 206
Good luck on this one. I learned this in in first year 5 years ago and don't quite remember how to do it. From glancing at the wiki though, if you wrote the rows colums in the correct order (and it does matter), what you start doing is you circle all rectangles of adjacent zeroes and ones (remember just rectangles- that includes square, single rows and and single colums). Each of these groups represents one term of the boolean expression (a min-term or max-term, I forget...I think it depends on how you do it).

THat is what this image on the wiki is trying to describe. There can be overlaps.
File:K-map 6,8,9,10,11,12,13,14 anti-race.svg - Wikipedia, the free encyclopedia

WHen I did it, I only ever did it with minterms. I *think* this is what it was. Each square is a min-term. YOu could write every single min-term out but this is redundant and long. What you are doing when you circle groups of zeroes and ones is you grouping redundant terms together . All of these min-terms/squares inside a single group can all be described by ONE min-term. When you write out the equation you just look at the similarity between all the min-terms and simplify it like that (there will be similiarities between them, such as A is always 1, or something like that so instead of writing out A, you can just write 1 in it's place). Something like that...

DOes that help at all? Try going through the "Examples of 2-variable maps" on the wiki to see if you understand what they are doing.
 
Last edited:
i think i only need the Output here, and once I have my output I can plot this on the table. But I don't know how to get the output from the boolean expression given
 
You plug in every possible combination if inputs. THat's what you do.

So the inputs you stick into the equation are:
ABCD
0000
0001
0010
0011
...
1110
1111

Yup. THat's right. It's a pain in the ass.

And I think someone else went over it earlier, you make a table and label designate each column/row as an input of a certain sort. Like this:
File:K-map 4x4 empty.svg - Wikipedia, the free encyclopedia
File:K-map 2x4 empty.svg - Wikipedia, the free encyclopedia
File:K-map 2x2 empty.svg - Wikipedia, the free encyclopedia
and fill in the squares in the correct location with the corresponding result. Notice the order the column values are from left->right and the row values from top->bottom. THis matters. WHen I did this in class, we didn't know what the order was, we just learned the pattern and wrote it out. BUt I think someone mentioned it is gray code- neat. Anyways, it has to be like this because when you start circling like groups of values and translating them into min-terms or max-terms, it doesn't make sense since they have to be adjacent to each other in a certain way (only one value changing from one column or row to the next, which makes sense since it's gray code).

Whew, I picked that up again a lot faster than I ever thought I would.
 
Last edited:
You only need the gray code as the order for when you fill in the map. Either way, you are going to end up going through all possible combinations of inputs. I find it easier to go through them in binary order in a list (for large equations), and then fill out the map . You can also write out the table and go through it directly, square by square, plugging in the values to the equation.
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top