Karnaugh map

Karnaugh Map
Download
My Next Work
Boolean Algebra
Screenshots
Documentation
FAQ
Map Examples
Karnaugh Map Tutorial
Links
GuestBook

We teach learn your employees about social engineering and computer security. Security solution for your company.

Karnaugh map tutorial

The define problem

We have some logical function and need make circuit. If we want (or must) save some logical , we need minimalize our function. We have some ways how we can do it: a) Using boolean algebra and math - it is very hard. b) using program c) Do it by karnaugh map. Let's do it !

The function

We have some function, example : Y=aBcD+abcD+AbCD+ABCD+aBCD+AbcD+ABcD+abCd - The capital letters are negation of input. When we want make circuit now, we need: 8xAND_with_4_inputs and 1xOR_with_8inputs. Let's save something!

The write to karnaugh map

In our function is first term:aBcD It mean a=1,B=0,c=1,D=0. If you draw clear 4 inputs karnaugh map it looks:
4 inpurs karnaugh map

The rules is : "When is input 1 draw 1 under line of name input, when is input 0 draw 1 where is NOT line of name input". Our term is a=1,B=0,c=1,D=0. The first step is select squares where is possible set 1 when is a=1. The rules say "under line named a". The green squares on picture:
First step

The next input is term is B=0. The picture where are ALL terms with B=0(where is NOT line named b):
Second step of karnaugh map training

Now is time to merge a=1 and B=0
Third step of karnaugh map training

Now is time select area where are possible terms with c=1 and D=0. And merge it to c=1 and D=0:
Fourth step of karnaugh map training

Ok, now we have two karnaugh maps, one where can be terms with a=1 and B=0 and second map, where are terms with c=1 and D=0. The last step: MERGE ALL and select ONE square where is our term aBcD - is a=1,B=0,c=1,D=0 and set 1 here:
Fourth step of karnaugh map training

Ok,we have term aBcD - you must go back to first step and select sqaure for next 1 from term abcD and do it for all terms. The finish:
Fourth step of karnaugh map training

Minimalize function

So ok, we have our function in karnaugh map. Now - the true work: minimalize this function. The rules are:
Select rectangle where are sets 1 and this rectangle's sides has numbers of small squares power of 2. (example you can select to ONE term where are 1 in area of small squares : 2x1,2x2,2x4,4x4,4x1,8x1..etc) From this bigger rectangle you make ONE not-full term. The rules: You will wrote only inputs where are NOT changet values in this rectangle. The example on the picture is bigger rectangle in middle created by 2x2 basic squares. The value of a (0 or 1) is different in our rectangle - if is it different - Do not care on this input. The same is on c input. But in all 1s is b=1 and d=1, the result is : Y=bd
Fourth step of karnaugh map training