Sunday 8 May 2011

k map 2



 
space.gif
 
























































../images/main/bulllet_4dots_orange.gif
2-Variable K-Map
In any K-Map, each square represents a minterm. Adjacent squares always differ by just one literal (So that the unifying theorem may apply: X + X' = 1). For the 2-variable case (e.g.: variables X, Y), the map can be drawn as below. Two variable map is the one which has got only two variables as input.
  
space.gif
../images/digital/kmaps_2var.gif
  
space.gif
 ../images/main/bullet_star_pink.gifEquivalent labeling
K-map needs not follow the ordering as shown in the figure above. What this means is that we can change the position of m0, m1, m2, m3 of the above figure as shown in the two figures below.
  
space.gif
Position assignment is the same as the default k-maps positions. This is the one which we will be using throughout this tutorial.
  
space.gif
../images/digital/kmaps_eq_1.gif
  
space.gif
This figure is with changed position of m0, m1, m2, m3.
  
space.gif
../images/digital/kmaps_eq_2.gif
  
space.gif
The K-map for a function is specified by putting a '1' in the square corresponding to a minterm, a '0' otherwise.
  
space.gif
 ../images/main/bullet_star_pink.gifExample- Carry and Sum of a half adder
In this example we have the truth table as input, and we have two output functions. Generally we may have n output functions for m input variables. Since we have two output functions, we need to draw two k-maps (i.e. one for each function). Truth table of 1 bit adder is shown below. Draw the k-map for Carry and Sum as shown below.
  
space.gif
X
Y
Sum
Carry
0
0
0
0
0
1
1
0
1
0
1
0
1
1
0
1
  
space.gif
../images/digital/kmaps_1bit_adder_map.gif
  
space.gif
 ../images/main/bulllet_4dots_orange.gifGrouping/Circling K-maps
The power of K-maps is in minimizing the terms, K-maps can be minimized with the help of grouping the terms to form single terms. When forming groups of squares, observe/consider the following:
  
space.gif
  • Every square containing 1 must be considered at least once.
  • A square containing 1 can be included in as many groups as desired.
  • A group must be as large as possible.
  
space.gif
../images/digital/kmaps_rules.gif
  
space.gif
  • If a square containing 1 cannot be placed in a group, then leave it out to include in final expression.
  • The number of squares in a group must be equal to 2
  • , i.e. 2,4,8,.
  • The map is considered to be folded or spherical, therefore squares at the end of a row or column are treated as adjacent squares.
  • The simplified logic expression obtained from a K-map is not always unique. Groupings can be made in different ways.
  • Before drawing a K-map the logic expression must be in canonical form.
  
space.gif
../images/digital/kmaps_rules1.gif
  
space.gif
../images/digital/kmaps_rules2.gif
  
space.gif
In the next few pages we will see some examples on grouping.
  
space.gif
  
space.gif
 ../images/main/bullet_star_pink.gifExample of invalid groups
  
space.gif
../images/digital/kmaps_invalid_groups.gif
  
space.gif
 ../images/main/bullet_star_pink.gifExample - X'Y+XY
In this example we have the equation as input, and we have one output function. Draw the k-map for function F with marking 1 for X'Y and XY position. Now combine two 1's as shown in figure to form the single term. As you can see X and X' get canceled and only Y remains.
  
space.gif
F = Y
  
space.gif
../images/digital/kmaps_2var_equ1.gif
  
space.gif
 ../images/main/bullet_star_pink.gifExample - X'Y+XY+XY'
In this example we have the equation as input, and we have one output function. Draw the k-map for function F with marking 1 for X'Y, XY and XY position. Now combine two 1's as shown in figure to form the two single terms.
  
space.gif
F = X + Y
  
space.gif
../images/digital/kmaps_2var_2com.gif
  
space.gif
 ../images/main/bulllet_4dots_orange.gif3-Variable K-Map
There are 8 minterms for 3 variables (X, Y, Z). Therefore, there are 8 cells in a 3-variable K-map. One important thing to note is that K-maps follow the gray code sequence, not the binary one.
  
space.gif
../images/digital/kmaps_3var.gif
  
space.gif
Using gray code arrangement ensures that minterms of adjacent cells differ by only ONE literal. (Other arrangements which satisfy this criterion may also be used.)
  
space.gif
Each cell in a 3-variable K-map has 3 adjacent neighbours. In general, each cell in an n-variable K-map has n adjacent neighbours.
  
space.gif
../images/digital/kmaps_3var_gray.gif
  
space.gif
There is wrap-around in the K-map
  • X'Y'Z' (m0) is adjacent to X'YZ' (m2)
  • XY'Z' (m4) is adjacent to XYZ' (m6)
  
space.gif
../images/digital/kmaps_3var_wrap.gif
  
space.gif
 ../images/main/bullet_star_pink.gifExample
F = XYZ'+XYZ+X'YZ
  
space.gif
../images/digital/kmaps_3var_exm.gif
  
space.gif
F = XY + YZ
  
space.gif
 ../images/main/bullet_star_pink.gifExample
F(X,Y,Z) = (1,3,4,5,6,7)
  
space.gif
../images/digital/kmaps_3var_exm2.gif
  
space.gif
F = X + Z
  
space.gif
  
space.gif
  
space.gif

No comments:

Post a Comment