Boolean Algebra...Boolean Algebra Page 1 of 18 Prepared By : Jaya Sood Boolean Algebra The Algebra...

18
Boolean Algebra Page 1 of 18 Prepared By : Jaya Sood Boolean Algebra The Algebra which deals with only two values that is either TRUE or FALSE is called Boolean Algebra. It was developed by George Boole in 1854. Boolean Variable : The variable which can have only two values i.e. TRUE or FALSE are called Boolean or logical variables. Boolean Constants : There are two Boolean constants ; TRUE i.e. 1 or FALSE i.e. 0. Boolean Function : Boolean function consists of Boolean variables, Boolean constants, Boolean operators, parenthesis and equal to operator. Truth Table : A Truth Table is a tabular representation of all possible values of logical variables with all the possible results. A Truth Table of n input variables will have 2 n rows. Boolean Operators : The operators which operate on Boolean variables and constants are called Boolean Operators. a. NOT : It is represented by ’(compliment), ~(negation) or -(bar). It inverts or reverses the function value. (Truth Table for NOT operator) X X ( ~X) ( X ) 0 1 1 0 b. AND : It is represented by a .(dot). It performs logical multiplication. The output is true if all the inputs are true otherwise the output is false. (Truth Table of AND operator) X Y X.Y 0 0 0 0 1 0 1 0 0 1 1 1 c. OR : It is represented by a +(plus). It is used to perform logical addition. The output is True if either of the inputs is true. (Truth Table of OR operator) X Y X+Y 0 0 0 0 1 1 1 0 1 1 1 1 d. NAND : It is compliment of AND and derived from NOT-AND. The output is false when all the inputs are true. (Truth Table of NAND operator) X Y (X.Y)0 0 1 0 1 1 1 0 1 1 1 0 e. NOR : It is compliment of OR and derived from NOT-OR. The output is false if either of the inputs is true. (Truth Table of NOR operator) X Y (X+Y)0 0 1 0 1 0 1 0 0 1 1 0

Transcript of Boolean Algebra...Boolean Algebra Page 1 of 18 Prepared By : Jaya Sood Boolean Algebra The Algebra...

  • Boolean Algebra

    Page 1 of 18 Prepared By : Jaya Sood

    Boolean Algebra The Algebra which deals with only two values that is either TRUE or FALSE is

    called Boolean Algebra. It was developed by George Boole in 1854.

    Boolean Variable : The variable which can have only two values i.e. TRUE or FALSE are called

    Boolean or logical variables.

    Boolean Constants : There are two Boolean constants ; TRUE i.e. 1 or FALSE i.e. 0.

    Boolean Function : Boolean function consists of Boolean variables, Boolean constants, Boolean

    operators, parenthesis and equal to operator.

    Truth Table : A Truth Table is a tabular representation of all possible values of logical variables

    with all the possible results. A Truth Table of n input variables will have 2n rows.

    Boolean Operators : The operators which operate on Boolean variables and constants are

    called Boolean Operators.

    a. NOT : It is represented by ’(compliment), ~(negation) or -(bar). It inverts or reverses the

    function value. (Truth Table for NOT operator)

    X X’ ( ~X) ( X ) 0 1

    1 0

    b. AND : It is represented by a .(dot). It performs logical multiplication. The output is true if

    all the inputs are true otherwise the output is false. (Truth Table of AND operator)

    X Y X.Y

    0 0 0

    0 1 0

    1 0 0

    1 1 1

    c. OR : It is represented by a +(plus). It is used to perform logical addition. The output is

    True if either of the inputs is true. (Truth Table of OR operator)

    X Y X+Y

    0 0 0

    0 1 1

    1 0 1

    1 1 1

    d. NAND : It is compliment of AND and derived from NOT-AND. The output is false when all

    the inputs are true. (Truth Table of NAND operator)

    X Y (X.Y)’ 0 0 1

    0 1 1

    1 0 1

    1 1 0

    e. NOR : It is compliment of OR and derived from NOT-OR. The output is false if either of

    the inputs is true. (Truth Table of NOR operator)

    X Y (X+Y)’ 0 0 1

    0 1 0

    1 0 0

    1 1 0

  • Boolean Algebra

    Page 2 of 18 Prepared By : Jaya Sood

    Order Of Evaluation of logical operators in a Truth table from high to low is as follows:

    1. ( )

    2. NOT 3. AND

    4. OR

    Ques: Verify using Truth Table that X + X.Y = X for each X, Y in {0,1}.

    This is a 2 variable expression, so we require 22 = 4 rows (combinations) of input.

    X Y X.Y X+X.Y

    0 0 0 0

    0 1 0 0

    1 0 0 1

    1 1 1 1 Comparing the column X and X+X.Y, we find the contents of both the columns are identical. Hence proved.

    Ques: Prepare the Truth Table for the following function :

    F = A.(B’ + C) + C’

    This is a 3 variable expression, so number of input rows = 23 = 8.

    A B C B’ (B’+C) A.(B’+C) C’ F

    0 0 0 1 1 0 1 1

    0 0 1 1 1 0 0 0

    0 1 0 0 0 0 1 1

    0 1 1 0 1 0 0 0

    1 0 0 1 1 1 1 1

    1 0 1 1 1 1 0 1

    1 1 0 0 0 0 1 1

    1 1 1 0 1 1 0 1

    Ques: Prepare a Truth Table for the following function : F = x’y’z w + x’ y z w

    This is a 3 variable expression, so number of input rows = 24 = 16

    X Y Z W X’ Y’ X’Y’ZW X’YZW F

    0 0 0 0 1 1 0 0 0

    0 0 0 1 1 1 0 0 0

    0 0 1 0 1 1 0 0 0

    0 0 1 1 1 1 1 0 1

    0 1 0 0 1 0 0 0 0

    0 1 0 1 1 0 0 0 0

    0 1 1 0 1 0 0 0 0

    0 1 1 1 1 0 0 1 1

    1 0 0 0 0 1 0 0 0

    1 0 0 1 0 1 0 0 0

    1 0 1 0 0 1 0 0 0

    1 0 1 1 0 1 0 0 0

    1 1 0 0 0 0 0 0 0

    1 1 0 1 0 0 0 0 0

    1 1 1 0 0 0 0 0 0

    1 1 1 1 0 0 0 0 0

  • Boolean Algebra

    Page 3 of 18 Prepared By : Jaya Sood

    Duality Principle : It states that starting from a Boolean relation, you can device another

    Boolean relation by :

    1. changing each OR to AND and vice versa 2. changing each 0 to 1 and vice versa

    Ques: Write the Dual of the following :

    a. a + (a’.b) = a + b

    dual : a.(a’+b) = a.b b. a + 0 = a

    dual : a.1 = a

    c. (a + 0).(b + 1).(c + 1 + 0)

    dual : a.1 + b.0 + c.0.1

    d. (u + w).(uv’ + w) dual : u.w + (u + v’).w

    AXIOMS & THEOREMS OF BOOLEAN ALGEBRA

    1. Closure Property : It states that Boolean operations (+ and .) on Boolean variables

    and constants will always result into a Boolean value.

    2. Identity law : It states that sum of anything and 0 or product of anything and 1 is

    same as original.

    A + 0 = A

    A.1 = A

    3. Commutative Law : It states that we can reverse the order of variables that are ORed

    or ANDed together without changing truth of operation.

    A + B = B + A

    A.B = B.A

    4. Distributive Law : ORing variables and then ANDing the result with a single variable

    is equivalent to ANDing each variable with single variable and then Oring the products.

    A. (B + C) = A.B + A.C

    A + (B.C) = (A + B).(A + C)

    5. Complement Law : It states that sum of Boolean variable with its complement is

    always true and product of Boolean variable with its compliment is always false.

    A + A’ = 1 (Tautology)

    A.A’ = 0 (Fallacy)

    6. Null Element : No matter what is the value of Boolean variable, its sum with one is

    always 1 and its product with 0 is always 0.

    A + 1 = 1 (Tautology)

    A.0 = 0 (Fallacy)

    7. Idempotency : It states that sum or product of Boolean quantity to itself results in

    original.

    A + A = A

    A.A = A

    8. Involution Law : It states that complementing a variable twice or even any even

    number of times results in original value.

    (A’)’ = A

  • Boolean Algebra

    Page 4 of 18 Prepared By : Jaya Sood

    9. Associative Law : It states that we can associate, group of sum or product variables

    together with parenthesis without altering the truth of expression.

    A + (B + C) = (A + B) + C A.(B.C) = (A.B).C

    10. Absorption Law : It is also known as covering and has three forms.

    1st Law A + A.B = A

    A.(A + B) = A 2nd Law A + A’B = A + B

    A.(A’ + B) = A.B

    3rd Law (A + B)(A’ + C)(B + C) = (A + B)(A’ + C)

    A.B + A’.C + B.C = A.B + A’.C

    Ques. Verify the Absorption Laws algebraically.

    1st Law :

    a. A + A.B = A

    LHS = A.1 + A.B by Identity A.1=A = A.(1 + B) by Distributive A.(B+C)= A.B+A.C

    = A.1 by Null element A+1=1

    = A = RHS by Identity A.1=A

    b. A.(A + B) = A LHS = A.A + A.B by Distributive A.(B+C)= A.B+A.C

    = A + A.B by Idempotency A.A=A

    = A.1 + A.B by Identity A.1=A

    = A.(1 + B) by Distributive A.(B+C)= A.B+A.C

    = A.1 by Null element A+1=1

    = A = RHS by Identity A.1=A 2nd Law :

    a. A + A’.B = A + B

    LHS = (A+ A') . (A+B) by Distributive A.(B+C)= A.B+A.C

    = 1. (A+B) by Complement A+A'=1

    = A+B by Identity A.1=A

    b. A.(A’ + B) = A.B

    LHS = A.A’ + A.B by Distributive A.(B+C)= A.B+A.C

    = 0 + A.B by Complement A.A’= 0

    = A.B by Identity A+0=A 3rd Law :

    a. (A + B)(A’ + C)(B + C) = (A + B)(A’ + C)

    LHS= (A + B)(A’ + C)(B + C)(B+C) by Idempotency A.A=A

    = (A + B)(B + C)(A’ + C)(B+C) by Commutative A.B=B.A

    = ((B + A)(B + C)(C + A’)(C + B)) by Commutative A+B=B+A

    = (B + A.C)(C + A’.B) by Distributive A+(B.C)=(A+B).(A+C) = (B + A.C).C + (B + A.C).A’.B by Distributive A.(B+C)=A.B+A.C

    = B.C + A.C.C + A’B.B + A’.A.B.C by Distributive A.(B+C)=A.B+A.C

    = B.C + A.C + A’B + 0 by Idempotency A.A=A, Complement A’A=0

    = (A + B).C + A’.(A + B) by Distributive A.(B+C)=A.B+A.C

    = (A + B)(A’ + C) by Distributive A+(B.C )=(A+B).(A+C) = RHS

  • Boolean Algebra

    Page 5 of 18 Prepared By : Jaya Sood

    b. A.B + A’.C + B.C = A.B + A’.C

    LHS = A.B + A’.C + B.C

    = A.B + A’.C + B.C.1 by Identity A.1=A = A.B + A’.C + B.C.(A +A’) by Complement A+A'=1

    = A.B + A’.C + A.B.C + A’.B.C by Distributive A.(B+C)=A.B+A.C

    = A.B + A.B.C + A’.C + A’.B.C by Commutative A+B=B+A

    = A.B.(1 + C) + A’.C.(1 + B) by Distributive A.(B+C)=A.B+A.C

    = A.B.1 + A’.C.1 by Null element A+1=1 = A.B + A’.C by Identity A.1=A

    (A + B)(A’ + C)(B + C) = (A + B)(A’ + C)

    LHS= (A + B)(A’ + C)(B + C+ 0) by Identity A+0=A

    = (A + B)(A’ + C)(B + C+ A.A’) by Complement A.A’= 0 = (A + B)(A’ + C)(B + C+ A) (B + C+ A’) by Distributive A+(B.C)=(A+B).(A+C)

    = (A + B) (B + C+ A) (A’ + C) (B + C+ A’) by Commutative A.B=B.A

    = (A + B) (A + B + C) (A’ + C) (A’ + C + B) by Commutative A+B=B+A

    = (A + B + 0) (A + B + C) (A’ + C +0) (A’ + C + B) by Identity A+0=A

    = ((A + B) + (0. C)). ( (A’ + C) + (0.B)) by Distributive A+(B.C )=(A+B).(A+C)

    = ((A + B) + 0). ( (A’ + C) + 0) by Null Element A.0 = 0 = (A + B). (A’ + C) by Identity A+0=A

    = RHS

    Ques. Prove Algebraically: X’.Y +Z = (X’ + Y’ + Z)(X’ + Y + Z)(X + Y + Z)

    RHS = (X’ + Y’ + Z)(X’ + Y + Z)(X + Y + Z) = (X’ + Y’ + Z)(X’.X + (Y + Z)) by Distributive A+(B.C )=(A+B).(A+C)

    = (X’ + Y’ + Z)(0 + (Y + Z))

    = (X’ + Y’ + Z).(Y + Z)

    = (Y + Z).(X’ + (Y’ + Z))

    = (Y + Z).X’ + (Y + Z).(Y’ + Z) by Distributive A.(B+C)=A.B+A.C = (Y + Z).X’ + (Y + Z).Y’ + (Y+Z).Z by Distributive A.(B+C)=A.B+A.C

    = X’.Y + X’Z + Y.Y’ + Y’Z + Y.Z + Z.Z by Distributive A.(B+C)=A.B+A.C

    = X’.Y + X’Z + 0 + Y’Z + Y.Z + Z

    = X’.Y + X’Z + Z.(Y’ + Y) + Z

    = X’.Y + X’Z + Z.1 + Z = X’.Y + Z(1 + X’)

    = X’.Y + Z

    LHS = X’.Y + Z

    = (X’ + Z)(Y + Z)

    = (X’ + Z + 0)(Y + Z + 0) = (X’ + Y.Y’ + Z)(X.X’ + Y + Z)

    = ((X’ + Z) + Y.Y’).(X.X’ + (Y + Z))

    = (Y + X’ + Z)(Y’ + X’ + Z)(X + Y + Z)(X’ + Y + Z)

    = (X’ + Y + Z)(Y’ + X’ + Z)(X + Y + Z)

    Q. Prove Algebraically : X’.Y + Y’.Z = X’.Y.Z + X’.Y.Z’ + X.Y’.Z + X’.Y’.Z

    RHS = X’.Y.Z + X’.Y.Z’ + X.Y’.Z + X’.Y’.Z

    = X’.Y.(Z + Z’) + Y’.Z.(X + X’)

    = X’Y.1 + Y.Z.1

    = X’Y + Y’Z

    LHS = X’.Y + Y’.Z

    = X’.Y.1 + Y’.Z.1

    = X’.Y.(Z + Z’) + Y’.Z.(X + X’)

    = X’.Y.Z + X’.Y.Z’ + X.Y’.Z + X’.Y’.Z

  • Boolean Algebra

    Page 6 of 18 Prepared By : Jaya Sood

    Q. Prove Algebraically. (A + B).(A’ + C) = (A + B + C)(A + B + C’)(A’ + B + C)(A’ + B’ + C)

    LHS = (A + B).(A’ + C)

    = (A + B + 0).(A’ + 0 + C) = (A + B + C.C’).(A’ + B.B’ + C)

    = ((A + B) + C.C’).((A’ + C) + B.B’)

    = (A + B + C)(A + B + C’)(A’ + B + C)(A’ + B’ + C)

    RHS = (A + B + C)(A + B + C’)(A’ + B + C)(A’ + B’ + C) = (A + B + C.C’).(A’ + B.B’ + C)

    = (A + B + 0).(A’ + 0 + C)

    = (A + B).(A’ + C)

    11. De Morgan Theorem : states that the complement of a sum/product equals the product /sum of the complements.

    (A + B)’ = A’. B’

    (A . B)’ = A’ + B’

    Break the line - change the sign (A + B) = A . B

    Complement law states that - X + X’ = 1 also X.X’ = 0

    Assuming that De Morgan theorem is true, then by proving the complement laws

    through it. we shall also establish De Morgan laws : Now, for 1st De Morgan Law. Let X = (A+B), So by Complement law:

    (i) (A + B) + (A + B)’ = 1 (ii) (A + B).(A + B)’ = 0

    (i) (A + B) + (A + B)’ = 1

    LHS = (A + B) + (A + B)’

    = (A + B) + A’.B’ by De Morgan = (A + B + A’)(A + B + B’) by Distributive

    = (1 + B)(1 + A) by Null element

    = 1 . 1 = 1

    (ii) (A + B).(A + B)’ = 0 LHS = (A + B).(A + B)’

    = (A + B). A’.B’ by De Morgan

    = A.A’.B + B.A’.B’ by Distributive

    = 0.B’ + A’.0 by Null element

    = 0 + 0 = 0

    Now, for 2nd De Morgan Law. Let X = (A.B), So by Complement law:

    (iii) (A.B) + (A.B)’ = 1

    (iv) (A.B).(A.B)’ = 0

    (iii) (A.B) + (A.B)’ = 1

    LHS = (A.B) + (A.B)’

    = A.B + (A’ + B’) by De Morgan

    = (A + A’ + B’).(B + A’ + B’) by Distributive

    = (1 + B’)(1 + A’)

    = 1 . 1 = 1

    (iv) (A.B).(A.B)’ = 0

    LHS = (A.B).(A.B)’

    = (A.B).(A’ + B’) by De Morgan

    = A.B.A’ + A.B.B’ by Distributive

    = 0.B + A.0 = 0 + 0 = 0

  • Boolean Algebra

    Page 7 of 18 Prepared By : Jaya Sood

    Q. Find the complement of the Boolean function: F(A,B) = (A.B)’ + A’ + A.B

    F’ = ( (A.B)’ + A’ + A.B )’

    = ( (A’ + B’) + A’ + A.B )’ = ( (A’ + B’) + (A’ + A.B) )’

    = ( A’ + B’ )’ . ( A’ + A.B )’

    = (A’’ . B’’) . (A’’ . (A.B) ’)

    = (A . B) . (A . (A’ + B’))

    = A . B . ( A.A’ + A.B’) = A . B . ( 0 + A.B’)

    = A . B . ( A.B’ )

    = A . A . B . B’

    = A .0 = 0

    Q. Prove Algebraically. (a + b)’.(a’ + b’) = a’.b’

    LHS = (a + b)’.(a’ + b’)

    = (a’.b’). (a’ + b’)

    = a’.b’.a’ + a’.b’.b’

    = a’.b’ + a’.b’

    = a’.b’

    Literal : A literal is a variable or its complement eg. x, x’, y, y’ etc

    MINTERM : Minterm is a Product of all literals with or without the bar within the logic

    system. For any combination of inputs in the Truth Table if the value of a variable is 0 the corresponding literals are complemented in the product (Minterm).

    Minterms for a 3 variable Function F(X, Y, Z)

    X Y Z Minterm Shorthand

    Notation

    0 0 0 X’.Y’.Z’ m0

    0 0 1 X’.Y’.Z m1

    0 1 0 X’.Y.Z’ m2

    0 1 1 X’.Y.Z m3

    1 0 0 X.Y’.Z’ m4

    1 0 1 X.Y’.Z m5

    1 1 0 X.Y.Z’ m6

    1 1 1 X.Y.Z m7

    MAXTERM : Maxterm is the Sum of all the literals with or without the bar within the logic

    system. For any combination of inputs in the Truth Table if the variable is 1, the corresponding literals are complemented in the sum (Maxterm)

    Maxterms for a 3 variable Function F(X, Y, Z)

    X Y Z Minterm Shorthand

    Notation

    0 0 0 ( X+Y+Z ) M0

    0 0 1 ( X+Y+Z’ ) M1

    0 1 0 ( X+Y’+Z ) M2

    0 1 1 ( X+Y’+Z’ ) M3

    1 0 0 ( X’+Y+Z ) M4

    1 0 1 ( X’+Y+Z’ ) M5

    1 1 0 ( X’+Y’+Z ) M6

    1 1 1 ( X’+Y’+Z’ ) M7

  • Boolean Algebra

    Page 8 of 18 Prepared By : Jaya Sood

    Finding MINTERM/MAXTERM shorthand notation

    Q. Find the Minterm designation of X’.Y.Z’

    Minterm = X’.Y.Z’

    Binary word = 010

    Decimal equivalent = 0*22 + 1*21 + 0*20

    = 0 + 2 + 0

    = 2 shorthand notation = m2

    Q. Find Maxterm designation of (X’ + Y + Z’) Maxterm = (x’ + y + z’ )

    Binary word = 101

    Decimal Equivalent = 1*22 + 0*21 + 1*20

    = 4 + 0 + 1

    = 5 Shorthand notation = M5

    CANONICAL EXPRESSION

    A Boolean expression composed entirely either of Minterms or Maxterms is called canonical

    expression. It is of two forms : 1. Canonical Sum-Of-Products Form (SOP)

    2. Canonical Product-Of-Sum Form (POS)

    Canonical SOP : Canonical expression composed of sum of Minterms (products of all literals) is

    in canonical SOP form

    Steps To Derive Canonical SOP step 1 : Prepare a Truth Table for Boolean function

    step 2 : Add a new column and write Minterms ( Product of Literals where 0 is complemented)

    for all those combinations where output is 1

    step 3 : Summation (+) of above Minterms gives you the desired Canonical SOP

    Q. Express in SOP the Boolean function F(X, Y, Z). The Truth Table for which is given below.

    A B C F Minterm Shorthand

    0 0 0 0

    0 0 1 1 x’.y’.z m1

    0 1 0 1 x’.y.z’ m2

    0 1 1 0

    1 0 0 1 x.y’.z’ m4

    1 0 1 0

    1 1 0 0

    1 1 1 1 x.y.z m7

    F = m1 + m2 + m4 + m7 F = ∑(1, 2, 4, 7)

    F = x’.y’.z + x’.y.z’ + x.y’.z’ + x.y.z

    Canonical POS : Canonical expression composed of product of Maxterms (sum of all literals) is

    in canonical POS form.

    Steps To Derive Canonical POS step1 : Prepare a Truth Table for Boolean function

    step2 : Add a new column and write Maxterms ( Sum of Literals where 1 is complemented) for

    all those combinations where output is 0

    step3 : Product (.) of above Maxterms gives you the desired Canonical POS

  • Boolean Algebra

    Page 9 of 18 Prepared By : Jaya Sood

    Q. Express in POS the Boolean function F(A, B, C). The Truth Table for which is given below.

    A B C F Maxterms Shorthand

    0 0 0 0 (x + y + z) M0

    0 0 1 1

    0 1 0 0 (x + y’ + z) M2

    0 1 1 1

    1 0 0 0 (x’ + y + z) M4

    1 0 1 1

    1 1 0 0 (x’ + y’ + z) M6

    1 1 1 1

    F = M0 + M2 + M4 + M6

    F = π(0, 2, 4, 6)

    F = (x + y + z)(x + y’ + z)(x’ + y + z)(x’ + y’ + z)

    Algebraic Method To Derive Canonical SOP

    step1 : Convert the given Boolean function into sum of products form

    step2 : For every term where a variable is missing multiply with

    (missingVar + (missingVar)’) and expand

    step3 : Remove duplicate terms if any

    Q. Find canonical SOP of the following function

    F = (A + C)(B + C)

    Above function is product of sum so we need to convert it to sum of products form.

    F = C + A.B By distributive

    F = 1.1.C + A.B.1 Now we need to introduce the missing variables in each term

    F = (A + A’)(B + B’).C + A.B.(C + C’)

    = ((A + A’).B + (A + A’).B’).C + A.B.C + A.B.C’

    = (A.B + A’.B + A.B’ + A’.B’).C + A.B.C + A.B.C’

    = A.B.C + A’.B.C + A.B’.C + A’.B’.C + A.B.C + A.B.C’ = A.B.C + A’.B.C + A.B’.C + A’.B’.C + A.B.C’

    = 111 + 011 + 101 + 001 + 110

    = m7 + m3 + m5 + m1 + m6

    F = ∑(1, 3, 5, 6, 7)

    Algebraic Method To Derive Canonical POS

    step1 : Convert the given Boolean function into product of sum form

    step2 : For every term where a variable is missing multiply with

    (missingVar.missingVar)’) and expand

    step3 : Remove duplicate terms if any

    Q. Find the canonical POS of the following function

    F = A.C + B.C

    Above function is in sum of products so we need to convert it to product of sums form.

    F = C . ( A + B )

    = ( 0 + 0 + C ) . ( A + B +0 ) Now we need to introduce missing variable

    = (A.A’ + B.B’ + C).(A + B + C.C’)

    = (A + B.B’ + C)(A’ + B.B’ + C)(A + B + C)(A + B + C’)

    = (A + B + C)(A + B’ + C)(A’ + B + C)(A’ + B’ + C)(A + B + C)(A + B + C’)

    = (A + B + C)(A + B’ + C)(A’ + B + C)(A’ + B’ + C)(A + B + C’) = 000 . 010 . 100 . 110 . 001

    = M0 . M2 . M4 . M6 . M1

    = π(0, 1, 2, 4, 6)

  • Boolean Algebra

    Page 10 of 18 Prepared By : Jaya Sood

    KARNOUGH MAP is a graphical representation of information in truth table. Karnough map is

    extensively used for simplifying Boolean expression upto six variables. The map consist of 2n squares for n variable function.

    Drawing K-MAP for SOP (Minterms)

    Note : The numbering scheme for squares is in Grey Code in which only one bit differs in

    successive binary numbers. 0000 0001 0011 0010 0110 0111 0101 0100 1100 1101 1111 1110 1010 1011 1001 1000

    0 1 3 2 6 7 5 4 12 13 15 14 10 11 9 8

    Steps/Rules for SOP reduction using KMAP

    1. Draw an empty KMAP for Minterms ( Product of Literals where 0 is complemented).

    2. Map the given function by entering 1’s as the output in the squares whose Minterms are

    present in Boolean function

    3. First encircle all the possible octets, then the quads, next the pairs and finally singlets. Do not forget to roll the map both vertically and horizontally and overlap groups if the need be.

    4. Remove redundant groups if any.

    5. Write the reduced expressions for all groups and (+) them.

    Overlapping : We are allowed to use a Minterm (1) in more than one group.

    Octets : are groups of eight adjacent Minterms (1’s). In a quad three variables that change their state are removed.

    Quads : are groups of four adjacent Minterms (1’s). In a quad two variables that change

    their state are removed.

    Pairs : are groups of two adjacent Minterms (1’s) . In a pair one variable that changes its

    state is removed. Singlets : is only one Minterm (1). No variable is removed from singlet.

    Map Rolling : while encircling the groups of octets, quads and pairs, the map is

    considered as if its left and right edges and top and bottom edges are adjacent.

    Redundant group : It is a group whose all Minterms (1’s) are overlapped by other

    groups. Redundant groups are ignored.

    Q. Obtain a simplified form a Boolean expression -

    F(U, V, W, Z) = ∑(0, 1, 3, 5, 7, 9, 10, 11, 12, 13, 14, 15)

    Octet 1 : Z

    Quad 2 : UV

    Quad 3 : UW

    Pair 4 : U’V’W’ Singlet : Nil

    Map Rolling: Done

    Redundant Check: Done F(U, V, W, Z) = U’V’W’ + UW + UV + Z

    (00) W’Z’

    (01)

    W’Z (11)

    WZ (10)

    WZ’

    (00) U’V’ 1 0 1 1 1 3 2 (01)

    U’V 4 1 5 1 7 6

    (11)

    UV 1 12 1 3 1 15 1 14 (10)

    UV’ 8 1 9 1 11 1 10

    3

    4

    1 2

  • Boolean Algebra

    Page 11 of 18 Prepared By : Jaya Sood

    Q. Obtain a simplified form for a Boolean expression.

    F(U, V, W, Z) = ∑(0, 1, 2, 4, 5, 7, 9, 10, 13, 15)

    Octet : Nil

    Quad 1: W’Z

    Quad 2: U’W’ Quad 3 : VZ

    Pair 4 : V’WZ’

    Singlet : Nil , Map Rolling: Done, Redundant Check: Done F(U, V, W, Z) = V’WZ’ + VZ + W’Z + U’W’

    Q. Reduce the following using KMAP -

    a. F(U, V, W, Z) = ∑(0, 1, 2, 3, 4, 6, 8, 9, 10, 11, 12, 14)

    Octet 1: V’ Octet 2: Z’

    Quad : Nil , Pair: Nil , Singlet : Nil,

    Map Rolling: Done, Redundant Check: Done F(U, V, W, Z) = V’ + Z’

    b. F(U, V, W, Z) = ∑(0, 1, 2, 6, 8, 9, 10, 14)

    Redundant Quad

    obtained by rolling the Map

    Vertically and Horizontally

    simultaneously.

    (00) W’Z’

    (01)

    W’Z (11)

    WZ (10)

    WZ’

    (00) U’V’ 1 0 1 1

    3 1 2 (01)

    U’V 1 4 1 5 1 7 6 (11)

    UV 12 1 13 1 15 14

    (10)

    UV’ 8 1 9 11 1 10

    (00) W’Z’

    (01)

    W’Z (11)

    WZ (10)

    WZ’

    (00) U’V’ 1 0 1 1 1 3 1 2 (01)

    U’V 1 4 5 7 1 6 (11)

    UV 1 12 13 15 1 14 (10)

    UV’ 1 8 1 9 1 11 1 10

    (00) W’Z’

    (01)

    W’Z (11)

    WZ (10)

    WZ’

    (00) U’V’ 1 0 1 1 3 1 2 (01)

    U’V 4 5 7 1 6

    (11)

    UV 12 13 15 1 14

    (10)

    UV’ 1 8 1 9 11 1 10

    1

    2

    1

    2

    3

    4

    2

    3

    1

  • Boolean Algebra

    Page 12 of 18 Prepared By : Jaya Sood

    Quad 1: V’W’

    Quad 2: WZ’

    Quad : Nil , Pair: Nil , Singlet : Nil, Map Rolling: Done, Redundant Check: Done

    F(U, V, W, Z) = V’W’ +WZ’

    c. F(A, B, C, D) = ∑(3, 4, 5, 13, 15)

    Octet : Nil

    Quad : Nil

    Pair 1 : UVZ Pair 2 : U’VW’

    Singlet 3 : U’V’WZ

    Map Rolling: Done, Redundant Check: Done F(U, V, W, Z) = UVZ + U’VW’+ U’V’WZ

    Drawing K-MAP for POS (Maxterms)

    Steps/Rules for POS reduction using KMAP 1. Draw an empty KMAP for Maxterms ( Sum of Literals where 1 is complemented).

    2. Map the given function by entering 0’s as the output in the squares whose Maxterms are

    present in Boolean function

    3. First encircle all the possible octets, then the quads, next the pairs and finally singlets. Do

    not forget to roll the map both vertically and horizontally and overlap groups if the need be. 4. Remove redundant groups if any.

    5. Write the reduced expressions for all groups and (.) them.

    Q. Find the simplified POS expression of given function

    F(A, B, C, D) = π (0, 1, 3, 5, 6, 7, 10, 14, 15)

    Octet : Nil Quad 1: (A +D’)

    Quad 2: (B’+C’)

    Pair 3 : (A+B+C)

    Pair 4: (A’+C’+D)

    Singlet : Nil, Map Rolling: Done, Redundant Check: Done

    F(A,B,C,D)= (A +D’). (B’+C’). (A+B+C). (A’+C’+D)

    (00) W’Z’

    (01)

    W’Z (11)

    WZ (10)

    WZ’

    (00) U’V’

    0 1 1 3 2 (01)

    U’V 1 4 1 5 7 6 (11)

    UV 12 1 13 1 15 14

    (10)

    UV’ 8 9 11 10

    (00) (C+D)

    (01)

    (C+D’) (11)

    (C’+D’) (10)

    (C’+D)

    (00) (A+B) 0 0 0 1 0 3 2

    (01)

    (A+B’) 4 0 5 0 7 0 6

    (11)

    (A’+B’) 12 13 0 15 0 14

    (10)

    (A’+B) 8 9 11 0 10

    1

    2

    3

    4

    1

    2

    3

  • Boolean Algebra

    Page 13 of 18 Prepared By : Jaya Sood

    Changing POS into reduced SOP using K-Map

    Q. Obtain a simplified form for the Boolean expression using KMAP

    F(U, V, W, Z) = π(1, 3, 5, 7, 12, 14)

    Changing into SOP form

    F(U, V, W, Z) = ∑(0, 2, 4, 6, 8, 9, 10, 11, 13, 15)

    Octet : Nil

    Quad 1: A’.D’

    Quad 2: A.D Quad 3: A.B’

    Singlet : Nil, Map Rolling: Done, Redundant Check: Done

    F(A, B, C, D) = A’D’ + AD + A.B’

    Q. Reduce the following 3-variable functions using K-MAP 1. F(A,B,C) = ∑(0, 1, 2, 4, 6, 7)

    Quad 1 : C’

    Pair 2 : A’B’

    Pair 3 : A.B

    F(U,V.) = C’ + A’.B’ + A.B

    2. F(U,V,W) = π(1, 3, 6, 7)

    Pair 1: (A+C’) Pair 2 : (A’+B’)

    F(A,B,C) = (A+C’). (A’+B’)

    (00) W’Z’

    (01)

    W’Z (11)

    WZ (10)

    WZ’

    (00) U’V’ 1 0

    1 3 1 2 (01)

    U’V 1 4 5 7 1 6 (11)

    UV 12 1 13 1 15 14

    (10)

    UV’ 1 8 1 9 1 11 1 10

    (00) B’C’

    (01)

    B’C (11)

    BC (10)

    BC’

    (0) A’ 1 0 1 1 3 1 2 (1)

    A 1 4 5

    1 7 1 6

    (00) (B+C)

    (01)

    (B+C’) (11)

    (B’+C’) (10)

    (B’+C)

    (0) (A)

    0 0 1 0 3

    2

    (1)

    (A’) 4 5

    0 7 0 6

    1

    3

    2

    1

    2

    1

    2 3

  • Boolean Algebra

    Page 14 of 18 Prepared By : Jaya Sood

    LOGIC GATES : A gate is an electronic circuit which operates on one or more signals to produce

    an output signal. Gates are digital circuits because the inputs and outputs can take only two

    values either low voltage (denoted by 0) or high voltage (denoted by 1). They are also called logic circuits because they can be analysed with Boolean algebra.

    There are following types of gates :

    NOT f( x) = x’

    AND f(x, y) = x.y

    OR f(x, y) = x+y

    NAND f(x, y) = (x.y)’

    NOR f(x, y) = (x+y)’

    XOR f(x, y) = x’y +x.y’

    Exclusive OR (XOR) gate produces a

    high output if odd number of input

    signals are high.

    Truth Table for XOR Gate

    x y x’ y’ x’y xy’ f= x xor y

    0 0 1 1 0 0 0

    0 1 1 0 1 0 1

    1 0 0 1 0 1 1

    1 1 0 0 0 0 0

    f

  • Boolean Algebra

    Page 15 of 18 Prepared By : Jaya Sood

    Q. Design a Logic circuit to realise the following :

    F(A, B, C, D) = A.B + A.C’ + A’.B’.C

    = (A AND B) OR (A AND (NOT C)) OR ((NOT A) AND (NOT B) AND C)

    Q. Draw the logic circuit diagram for the given function.

    F(X, Y, Z) = (X + Y) . (X’ + Z’) . (Y + Z)

    = (X OR Y) AND ((NOT X) OR (NOT Z)) AND (Y OR Z)

    Q. Write the equivalent Boolean function for the logic circuit : 1

    Ans : F = (X + Y’) . (X’ + Y) . (X’ + Y’)

    2.

    Ans : F = U.V’ + U’.V + U’.V’

  • Boolean Algebra

    Page 16 of 18 Prepared By : Jaya Sood

    Universal Gates: NAND and NOR gates are called universal gates because all the other switching functions like NOT, AND, OR can be easily implemented using either NAND or NOR.

    NAND - to - NAND logic

    Tip: Convert the Given expression into Sum of Products (SOP) and complement twice to get

    NAND-to-NAND logic

    1. NOT operation using NAND’s

    F = X’

    F = (X.X)’

    2. AND operation using NAND’s F = X.Y

    F = X.Y + X.Y

    F’’= ( ( X.Y + X.Y )’ )’

    = ( (X.Y)’ . (X.Y)’ )’

    = (X NAND Y) NAND (X NAND Y)

    3. OR operation using NAND’s

    F = X + Y

    F = X.X + Y.Y

    F’’= ( (X.X + Y.Y )’ )’

    F = ( (X.X)’ . (Y.Y)’ )’ F = (X NAND X) NAND (Y NAND Y)

    NOR - to - NOR logic

    Tip: Convert the Given expression into Product of Sums(POS) and complement twice to get NOR - to - NOR logic

    1. NOT operation using NOR’s

    F = X’ F = (X + X)’

    2. AND operation using NOR’s

    F = X.Y

    F = (X+X) . (Y+Y)

    F = ( ( (X+X) . (Y+Y) )’ )’

    F = ( (X + X)’ + (Y + Y)’ )’ F = (X NOR X) NOR (Y NOR Y)

    3. OR operation using NOR’s F = X + Y

    F = (X + Y) . (X + Y)

    F = ( ( (X + Y) . (X + Y) )’ )’

    F = ( (X + Y)’ + (X + Y)’ )’

    F = (X NOR Y) NOR (X NOR Y)

  • Boolean Algebra

    Page 17 of 18 Prepared By : Jaya Sood

    Q. Draw the LCD using NAND gates only.

    F(X, Y, Z) = Y.Z + X.Z

    F’’ = ( (Y.Z + X.Z)’ )’

    F = ( (Y.Z)’ . (X.Z)’ )’

    = (Y NAND Z) NAND (X NAND Z)

    Q. Draw the LCD using NAND gates only.

    F(A, B, C) = A.B’.C + B.C’

    F’’ = ( ( A.B’.C + B.C’ )’ )’

    F = ( (A.B’.C)’ . (B.C’)’ )’

    = ( A.(B.B)’.C)’ . (B.(C.C)’)’ )’

    = ( A NAND (B NAND B) NAND C) NAND ( B NAND (C NAND C))

    A B C

    Q. Represent (X + Y’).Z with the help of NAND’s only.

    F = (X + Y’).Z

    Converting the given function into SOP form

    by distributive law : F = X.Z + Y’.Z

    F’’ = (( X.Z + Y’Z )’)’

    F = ( (X.Z)’ . ((Y.Y)’.Z)’ )’

    = ( X NAND Z) NAND (( Y NANDY) NAND

    Z)

    Q. Draw LCD for given function using NOR gates

    F = A.(B’ + C)

    F’’ = (( A . (B’+C) )’)’

    F = ( (A)’ + (B’+C)’ )’

    F = ( (A+A)’ + ( (B+B)’ + C)’ )’

    F = (A NOR A) NOR ((B NOR B) NOR C)

  • Boolean Algebra

    Page 18 of 18 Prepared By : Jaya Sood

    Q. Represent the given function in NOR - to - NOR LCD

    F = (A’ + B’ + C’).(A + B’+ C’).(A + B + C’)

    F’’=(( (A’+B’+C’) . (A+B’+C’) . (A+B+C’) )’)’ F’’=( (A’+B’+C’)’ + (A+B’+C’)’ + (A+B+C’)’ )’

    F=(((A+A)’+(B+B)’+(C+C)’)’+(A+(B+B)’+(C+C)’)’+(A+B+(C+C)’)’)’

    = ((A NOR A) NOR (B NOR B) NOR( C NOR C)) NOR ( A NOR ( B NOR B) NOR ( C NOR C)) NOR ( A NOR B NOR ( C NOR C))

    Q. Draw LCD using NOR gates.

    F = X.Y’ + Z

    Convert the given function into POS form using distributive law :

    F = (X+Z) . (Y’+Z)

    F’’= (( (X+Z) . (Y’+Z) )’)’

    F = ( (X+Z)’ + (Y’+Z)’ )’ F = ((X+Z)’ + ( (Y+Y)’ + Z)’)’

    = ( X NOR Z) NOR ((Y NOR Y) NOR Z)