9
Karnaugh Map (K-map ): The Karnaugh map is a simple technique provides a systematic method for simplifying and manipulating switching expression . In this technique , the information contained in the truth table or the available in the POS or Sop form is represented on the Karnaugh Map . In an n-variable K-map , there are 2 n cells. Each cell corresponds to one combination of n variable The K-map of 2-variable , 3-variable and 4-variable are given below with the decimal code of combination of variables are given inside the each cell. Example1: Consider a three variable boolean function whose truth table are given below

k map co.docx

Embed Size (px)

DESCRIPTION

implementation of k map in computer organaisation anna university notes

Citation preview

Page 1: k map co.docx

Karnaugh Map (K-map ):

The Karnaugh map is a simple technique provides a systematic method for simplifying and manipulating switching expression . In this technique , the information contained in the truth table or the available in the POS or Sop form is represented on the Karnaugh Map .

In an n-variable K-map , there are 2n cells. Each cell corresponds to one combination of n variable

 

The K-map of 2-variable , 3-variable and 4-variable are given below with the decimal code of combination of variables are given inside the each cell.

Example1: Consider a three variable boolean function whose truth table are given below

Hence , the output Y can be written as

Y=A¯B¯C+A¯BC¯+AB¯C¯+ABC

Y=m1+m2+m4+m7

Page 2: k map co.docx

The K-map of above three variable function is shown

Simplification Using K-map:

steps

1.Construct the K-map and enter the 1s in those cells corresponding to the combinations for which function value is 1, then enter the 0s in the other cells.

2. Examine the  map for 1s that cannot be combined with any any other 1 cells and form group with such single 1.

3. Next , look for those 1s which are adjacent to only one other 1 and form groups containing only 2 cells and which are not part  of any group of 44 or 8 cells. A group of 2 cells is called a pair.

4. Group the 1s which results in groups of 4 cells but are not part of an 8-cells group . A group of 4 cells is called a quad

5. Group the 1s which results in groups of 8 cells . A group of 8 cells is called an octet

6. Form more pairs , quads and octets to include these 1s that have not yet been grouped , and use only a minimu number of groups .There can be overlapping of groups if they include common 1s

7. Omit any redundant group

8. Form the logical sum of all he terms generated by each group

 

 

Example:Simplify the following expression using the K-map for the 4-variable A,B,C and DY=m1+m3+m5+m7+m8+m9+m12+m13

Solution:The K-map are shown

Page 3: k map co.docx

The expression using the following steps

step1: Construct the K-map and enter 1 in the cells corresponding to the minterms present  in the expression and 0 in the other cells

step2:  There are no 1s which are not adjacent to other 1s

step3:   There are no pairs which are not pair of any larger groups

step4: There are 2 quads . Cells 1,3,5,7 are grouped to form one quad and the second quad is made up of cells 12,13,8 and 9 . The combination corresponding to the cells in the first quad are A¯B¯C¯D , A¯B¯CD , A¯BC¯D and ABCD . In the above four combinations ,the variables A¯D are common in all the cells while B and C appear both complemented and uncomplemented forms . Form the preceding section , it is clear that only the variables that are the same in all the cells of the group must appear in the term corresponding to that group . Therefore , the minimized term for the first quad is AD , and that of the second quad AC¯

step5: There are no octets

step6: All the 1s have already been grouped

step7: The term generated by two groups and OR operated together to obtain the expression for Y as follows

Y = AC¯  +   A¯D

Page 4: k map co.docx

Boolean algebra is  system of mathematical logic . Any complex logic statement can be expressed by boolean function.The boolean algebra is governed by certain well developed rules and laws.In boolean algebra any single variable can have a value of either a "0" or "1" . Mathematician George Boole invented this type of Algebra.

Boolean Logic Operation:

A Boolean function is an algebraic expression found using binary constant ,binary variables and basic logical operation symbols .Basic logical operations include the AND function ,the OR function and the NOT function. A boolean function can be converted into a logic diagram composed of the AND , OR and NOT gates.

Logical AND operation:

The logical AND operation of two boolean variable A and B , gives as X=A.B as shown the table

Logical OR operation:

The logical OR operation of two boolean variable A and B , gives as X=A+B as shown table

Logical Complementation(Inversion):

The logical inverse operation is converts the logical 1 to the logical 0 and vice versa. This is also called the NOT operation .The symbol  used for this operation is a bar over the function or the variable as shown the table

Basic Laws Of Boolean Algebra:

Logical operation can be expressed and minimized mathematically using the rules , laws and theorems of Boolean algebra.

 

Page 5: k map co.docx

1.Boolean Addition:The basic rules of boolean addition are given below0+0=00+1=11+0=11+1=1Boolean addition is same as logical OR operation 2.Boolean Multiplication:The basic rules of boolean multiplication are given below0 . 0 = 00 . 1 = 01. 0 = 01 . 1 =1Boolean multiplication is same as logical AND operation 3.Properties Of Boolean Algebra: a) Commutative Property:A+B=B+AA.B=B.A b)Associative Property:*    A+(B+C)=(A+B)+C*     A.(B.C)=(A.B).C c)Distributive Property:*                                                 A+BC=(A+B)(A+C)proof:A+BC         =A.1+BC=A(1+B+C)+BC=A.1+A.B+A.C+BC=A.A+A.B+A.C+B.C=A(B+A)+C(B+A)=(A+B)(A+C) *                                                 A.(B+C)=A.B+A.C d)Absorption Law:*                                                       A+AB=Aproof:A+AB=A.1+A.B=A(1+B)=A.1=A*                                                    A.(A+B)=Aproof:A(A+B)=AA+AB=A+AB=A(1+B)=A.1=A e)Consensus laws:*                                                   AB+A‾ C+BC=AB+A‾ Cproof:AB+A‾ C+BC ==AB+A‾ C+BC.1=AB+A‾ C + BC(A+A‾)

Page 6: k map co.docx

=AB+A‾ C+ABC+A‾ BC=AB(1+C)+A‾ C(1+B)=AB+ A‾C*                                           (A+B)(A‾+ C)(B + C)=(A+B)(A‾+ C)proof:(A+B)(A‾+C)(B+C)==(A+B)(A‾+C)(B+C+0)=(A+B)(A‾+C)(B+C+AA‾)=(A+B)(A‾+C)(B+C+A)(B+C+A‾)=(A+B)(A‾+ C)

 

4. Principle Of Duality:

From above properties and laws of Boolean algebra given in the table, it is evident that they are grouped in pair. One expression can be obtained from other in each pair by replacing every 0 with 1 , every one with 0 , every (+) with (.) and every (-) with (+) . Any pair of expression satisfy this property is called dual expression. This characteristic of Boolean algebra is called the principle of duality.

Demorgan's Theorems:

1.    (AB)‾  =A‾  +   B‾

2.    (A+B)‾  =  A‾. B‾

Sum Of Product And Product Of Sums:

Logical functions are generally expressed in terms of logical variables . Values taken on by the logical functions and logical variable are in the binary form.An arbitrary logic function can be expressed in the following form

1.Sum Of Product (SOP)

2.Product Of Sum (POS)

Product Term:  The AND function is referred to as  a product (Eg:   ABC is a  product term)

Sum Term: The OR function is referred to as a sum(Eg:    A+B is a sum term)

1. Sum Of Product(SOP):

The sum of two or more logical product term is called SOP expression.It is basically an OR operation of  AND operated variable such as

Page 7: k map co.docx

Y=AB+BC+AC

2.Product Of Sum (POS):

The product of two or more logical sum term is called POS is called POS expression.It is basically an AND operation of  OR operated variable such as

Y=(A+B)(B+C)(A+C)

Minterm:

A product term containig all the K variable of the function in either complemented or uncomplemented form is called a Minterm (m).

Example:

In two variable function four possible combination are exist (AB  , A¯B , AB¯ , (AB)¯ ) . These product terms are called minterm ( m0, m1, m2, m3).

Canonical Sum Of Product Expression:

It is defined as logical sum of all the minterms derived from the row of truth table , for which the value of function is 1 .

Example:

If the canonical sum of product form of a 3-variable logic function Y has 3 minterms A¯B¯C¯ , AB¯C , ABC¯  this can be expressed as the sum of decimal codes corresponding these minterm as stated below

Y=∑m(0,5,6)

Y=m0 + m1 + m2

Y=A¯B¯C¯ +  AB¯C  +  ABC¯

Maxterm:

A sum term containig all the K variable of the function in either complemented or uncomplemented form is called a Maxterm(M)

Example:

In two variable function four possible combination are exist (A+B  , A¯+B , A+B¯ , (A+B)¯ ) . These sum terms are called maxterm(M0,M1,M2,M3).

Canonical Product Of Sum Expression:

It is defined as logical product of all the maxterms derived from the row of truth table , for which the value of function is 0 .

Example:

Page 8: k map co.docx

If the canonical product of sum form of a 3-variable logic function Y has 4 maxterms (A¯+B¯+C¯ ), (A+B¯+C) ,( A+B+C¯ ),(A+B+C) this can be expressed as the product of decimal codes corresponding these maxterms as stated below

Y=∏(0,2,4,7)

Y=M0M1M2M3

Y=(A+B+C)A+B¯+C)( A+B+C¯ )(A¯+B¯+C¯ )