chapter 4 boolean algebra rev2010 stud

Upload: bink-bonk

Post on 03-Jun-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    1/32

    Basic Postulates

    Duality

    Fundamental Theorems

    Simplification technique (Boolean Algebra)

    Standard Forms of Boolean Expressions

    Conversion to NAND/NAND and NOR/NOR network

    1

    CHAPTER 4

    BOOLEAN ALGEBRA

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    2/32

    Background2

    Boolean algebra is the mathematics of digital systems.

    Terms used in Boolean algebra

    A variableis a symbol used to represent a logical quantity.Any single variable can have the value of 1 or 0.

    The complementis the inverse of a variable and is indicatedby a bar over the variable.

    The complement of the variable . If , then .Sometimes a prime symbol is used to denote a complement ofa variable, .

    A literalis a variable or the complement of the variable.

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    3/32

    Background3

    Boolean Additionis the equivalent to the OR operation.

    A sum termis the sum of literals. In logic circuits, a sumterm is produced by an OR operation with no AND

    operations involved. Ex. A + B , A + B + C + D

    A sum term is equal to 1 when one or more of the literalsin the term are 1.

    A sum term is equal to 0 only if each of the literals is 0

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    4/32

    Background4

    Boolean Multiplicationis the equivalent to the ANDoperation.

    Aproduct termis the product of literals. In logic

    circuits, a product term is produced by an AND operationwith no OR operations involved.

    Ex. AB , ABCD

    A product term is equal to 1 only if each of the literals

    in the term is 1.

    A product term is equal to 0 when one or more of theliterals are 0.

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    5/32

    Basic Postulates (Laws)5

    Postulate 1: Definition A Boolean algebra is a closed algebraic system containing a set K of

    two or more elements and the two operators . and +

    Postulate 2: Existence of 1 and 0 elementsa) a + 0 = a

    b) a . 1 = a

    Postulate 3: Commutativitya) a + b = b + a

    b) a . b = b . a

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    6/32

    Basic Postulates6

    Postulate 4: Associativitya) a + ( b + c ) = ( a + b ) + c

    b) a . ( b . c ) = ( a . b ) . c

    Postulate 5: Distributivitya) a + ( b . c ) = ( a + b ) . ( a + c )

    b) a . ( b + c ) = ( a . b ) + ( a . c )

    Postulate 6: Existence of the complementa) a + a = 1

    b) a . a = 0

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    7/32

    Duality7

    The principle of duality states that , if an expression isvalid in Boolean algebra, the dual of the expression isalso valid.

    The dual expression is found by replacing all + operatorswith . , all . operators with +, all 1s with 0s, and all 0swith 1s.

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    8/32

    Fundamental Theorems (Rules)8

    There are 9 fundamental theorems of Boolean algebra,each of which rooted from the basic postulates.

    Theorem 1: Idempotency

    a) a + a = a

    b) a . a = a

    Theorem 2: Null elements for + and . operators

    a) a + 1 = 1

    b) a . 0 = 0

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    9/32

    9

    Theorem 3

    a) a'' = a

    Theorem 4: Absorptiona) a + ab = a

    b) a (a + b) = a

    Theorem 5a) a + ab= a + b

    b) a (a + b) = ab

    Fundamental Theorems

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    10/32

    10

    Theorem 6

    a) ab + ab = a

    b) (a+b)(a+b) = a

    Theorem 7

    a) ab + abc= ab + ac

    b) (a+b)(a+b+c) = (a+b)(a+c)

    Fundamental Theorems

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    11/32

    11

    Theorem 8: DeMorgans theorem

    a) (a+b) = ab

    b) (ab) = a + b

    Theorem 9: Consensus

    a) ab + ac +bc = ab + ac

    b) (a+b)(a+c)(b+c) = (a+b)(a+c)

    Fundamental Theorems

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    12/32

    Simplification of Boolean Expression12

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    13/32

    13

    Truth Table

    A B C

    0 0 0 1

    0 0 1 10 1 0 1

    0 1 1 1

    1 0 0 1

    1 0 1 0

    1 1 0 0

    1 1 1 0

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    14/32

    14

    Simplification of Boolean Expression

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    15/32

    15

    Simplification of Boolean Expression

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    16/32

    16

    Truth Table

    A B C

    0 0 0 1

    0 0 1 10 1 0 1

    0 1 1 1

    1 0 0 1

    1 0 1 0

    1 1 0 0

    1 1 1 0

    CBA

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    17/32

    Standard Forms of Boolean Expressions17

    We can express the algebraic function in the form ofalgebraic expressions, truth tables, Venn diagrams,SOP/POS form and also the standard forms (canonicalforms).

    All Boolean expression, regardless of their form, can beconverted into either one of the two standard forms:

    sum-of-products(SOP) form, or

    product-of-sum(POS)form.

    Standardization makes the evaluation, simplification, andimplementation of Boolean expressions more systematic.

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    18/32

    Domain of a Boolean expression18

    The domainof a general Boolean expression is the setof variables contained in the expression either incomplemented or uncomplemented form. Example, thedomain of the expression ABC + ACD +BD is the set

    of variables A, B, C, D.

    f ( A, B, C, D )= ABC + ACD +BD

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    19/32

    The Sum-of-Products (SOP) form19

    SOP : A function where each product term is formed byadding a number of complemented or uncomplementedvariables (literal).

    Ex: f(A, B, C, D) = ABC + BD + ACD

    In an SOP expression, a single overbar cannot extend

    more than one variable, although more than one variablein a term can have an overbar. For example, an SOPexpression can have the term but not .

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    20/32

    The Sum-of-Products (SOP) form20

    Any logic expression can be changed into SOP form byapplying Boolean algebra techniques.

    Ex.

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    21/32

    Canonical SOP21

    Also known as the Standard Sum-of-Products form

    A standard SOP expression is one in which allthevariables in the domain appear in each product term in

    the expression. Any nonstandard SOP can be convertedto the standard SOP form using Boolean algebra.

    Ex. Represent the following Boolean function in thecanonical SOP form:

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    22/32

    Canonical SOP22

    =

    =

    Now look at each product terms and find for missing domain,

    AB (missing C & D). Thus, add these domains into the term

    AB = AB (C+C)(D+D)

    = (A B C + A B C)(D + D)

    = ABCD + ABCD + ABCD + ABCD

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    23/32

    Canonical SOP23

    CD (missing A & B).

    CD =CD (A+A)(B+B)

    = (ACD + ACD)(B+B)

    = ABCD + ABCD + ABCD + ABCD

    Next, combine all these product terms,

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    24/32

    Canonical SOP24

    AB + ABCD + CD

    = ABCD + ABCD + ABCD + ABCD + ABCD+ ABCD+

    ABCD + ABCD+ ABCD

    = ABCD+ ABCD + ABCD + ABCD + ABCD + ABCD +

    ABCD

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    25/32

    Canonical SOP25

    For a switching function with n variables, if a productterm contains each of the n variables exactly one time incomplemented or uncomplemented form, the productterm is called a minterm.

    Minterm function is called as canonical sum-of-productsform (canonical SOP) or the standard sum-of-products.Ex1: f(A,B,C) = ABC + ABC +ABC +ABC

    An SOP expression is equal to 1 only if one or more ofthe product terms in the expression is equal to 1.

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    26/32

    The Product-of-Sums (POS) form26

    A function by taking the product of ORing (sum terms)where each sum term is formed by ORing a number ofcomplemented or uncomplemented variables.

    Ex: f(A, B, C, D) = (A+B+C)(B+C+ D)(A+ C+ D)

    In a POS expression, a single overbar cannot extendmore than one variable, although more than one variablein a term can have an overbar. For example, a POSexpression can have the term but not.

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    27/32

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    28/32

    Canonical POS28

    The terms are already in pos form. So inspect for missingdomain from each sum terms and add the domain.

    (A + B) is missing domain C ;A + B = A + B + C C

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

    ( B + C) is missing domain A ;

    B + C = AA + B + C

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

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    29/32

    Therefore, (A+B)(B+C) in standard POS form is

    For a switching function with n variables, if a sum termcontains each of the n variables exactly one time incomplemented or uncomplemented form, the sum term iscalled a maxterm.

    Thus, maxterm function is called as canonical product-of-sums form (canonical POS) or the standard product-of-sums.

    Ex: f(A,B,C)= (A+B+C)(A+B+C)(A+B+C)(A+B+C)

    Canonical POS29

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    30/32

    Canonical Forms30

    A POS expression is equal to 0 only if one or more

    of the sum terms in the expression is equal to 0.

    An SOP expression is equal to 1 only if one or moreof the product terms in the expression is equal to 1.

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    31/32

    31

    Decimal

    A B Cf

    (A,B,C) Minterms Maxterms

    0 0 0 0 0 ABC m0 A+B+C M0

    1 0 0 1 0 ABC m1 A+B+C M1

    2 0 1 0 1 ABC m2 A+B+C M23 0 1 1 1 ABC m3 A+B+C M3

    4 1 0 0 0 ABC m4 A + B+C M4

    5 1 0 1 0 ABC m5 A+B+C M5

    6 1 1 0 1 ABC m6 A+B+C M6

    7 1 1 1 1 ABC m7 A+B+C M7

    Ex3: Truth table for a function of 3 variables,

  • 8/12/2019 Chapter 4 Boolean Algebra Rev2010 Stud

    32/32

    From the truth table, determining standard SOP formfor the functionf:

    Compact form: f(A,B,C) = m2+ m3 + m6 + m7

    Minterm list form: f(A,B,C) =

    Standard SOP form: f(A,B,C) =

    32

    )7,6,3,2(m

    CBACBACBACBA

    Determining standard POS form for the functionf:Compact form: f(A,B,C) = M0 M1 M4 M5

    Maxterm list form: f(A,B,C) =

    Standard POS form: f(A,B,C) =

    )5,4,1,0(M

    ))()()(( CBACBACBACBA