Discrete Maths 2003 Lecture 32 3 Slides Pp

Embed Size (px)

Citation preview

  • 8/13/2019 Discrete Maths 2003 Lecture 32 3 Slides Pp

    1/5

  • 8/13/2019 Discrete Maths 2003 Lecture 32 3 Slides Pp

    2/5

    Lecture 32, 9-October-200Discrete Mathematics 2003

    4

    Simplifying the Drawing of a Circuit

    For more complicated circuits, it is convenient

    to allow AND & OR gates to have more than2 inputs

    e.g. Here is a 3-input OR gate:

    Exercise: Draw the digital circuit corresponding

    to the Boolean expressionxy'+x'+yz

    5

    8.4 Disjunctive Normal Form &

    Karnaugh Maps

    To date, weve simplified expressions by

    recognizing which laws can be used to produce a

    simpler expression than the one we started with

    However, its often unclear which law might be

    appropriate to use, or even whether the

    expression can be simplified at all

    For these reasons, in this section well take a

    more systematic approach to dealing with

    Boolean expressions

    6

    Converting a Table to a Boolean

    Expression

    Firstly look at a method to obtain a Boolean

    expression for a Boolean function in table form

    Example: Consider the following Booleanfunctionf(x,y)

    x y f(x,y)

    0 0 1

    0 1 0

    1 0 1

    1 1 0

  • 8/13/2019 Discrete Maths 2003 Lecture 32 3 Slides Pp

    3/5

  • 8/13/2019 Discrete Maths 2003 Lecture 32 3 Slides Pp

    4/5

    Lecture 32, 9-October-200Discrete Mathematics 2003

    10

    Solution to the Example

    To express f(x,y,z) in dnf, extend the method

    of the previous example

    For each row wheref(x,y,z) = 1, form theminterm involving the variablesx,y &z use

    the variable itself if the column for the variable

    contains a 1; use the complement of the variable

    if the column contains a 0

    f(x,y,z) is the sum of the resulting minterms

    Thus, in the example,

    f(x,y,z) =x'y'z +x'yz'+xy'z'+xyz

    11

    Converting an Expression to dnf

    Suppose we have a Boolean function that isgiven by an expression that is not in dnf

    How can the expression be converted to dnf?

    The following example illustrates the process

    Example: Supposef(x,y,z) = (x +y'z)(xy)'.Writef(x,y,z) in dnf

    Solution: By the 2nd de Morgan's law,

    (x +y'z)(xy)' = (x +y'z)(x'+y')

    Use the 2nd distrib. law to obtain a sum of terms:

    (x +y'z)(x'+y') = xx'+xy'+x'y'z +y'y'z

    12

    Example of Converting to dnf (cont)

    Next eliminate repeated occurrences of avariable in a term, by using xx'= 0 & xx =x:

    xx'+xy'+x'y'z +y'y'z = xy'+x'y'z +y'z

    Each term needs to contain all 3 variables souse x 1 =x & x +x'= 1:

    xy'+x'y'z +y'z = xy'(z +z') +x'y'z +y'z(x +x')

    = xy'z +xy'z'+x'y'z +xy'z +x'y'z

    Finally, any repeated minterms are eliminatedby usingx +x =x:

    f(x,y,z) = xy'z +xy'z'+x'y'z

  • 8/13/2019 Discrete Maths 2003 Lecture 32 3 Slides Pp

    5/5

    Lecture 32, 9-October-200Discrete Mathematics 2003

    13

    A Comment on dnf

    Note that in the example,xy'z +xy'z'+x'y'z isnot the simplest way of writing f(x,y,z)

    i.e. Part-way through the working we obtainedthe simpler expressionxy'+x'y'z +y'z (and theremay be even simpler expressions possible)

    The point of dnf is that it provides a standardway of writing a Boolean expression, fromwhich a systematic method for simplifying theexpression can be implemented

    This systematic method, based on the use ofKarnaugh maps, will be studied next lecture