De Morgans

download De Morgans

of 166

Transcript of De Morgans

  • 7/31/2019 De Morgans

    1/166

    [email protected]

    mailto:[email protected]:[email protected]
  • 7/31/2019 De Morgans

    2/166

  • 7/31/2019 De Morgans

    3/166

    Propositional logicThe propositional logic representlogic through proposition and

    logical connectives.

    We may define proposition as an

    elementary atomic sentence that

    may take either true value orfalse value but may not take

    other value .

  • 7/31/2019 De Morgans

    4/166

    Consider the following examples :

    It is raining [it is a proposition as it

    may either be true orfalse .

    Australia won the ICCworld cup 2007.

    It is a also proposition asit is true.

    India is a continent It is a proposition as it isfalse

    What did you eat It is not proposition as it

    does not result in true orfalse.

    How are you Not a proposition for the

    similar reason as above

  • 7/31/2019 De Morgans

    5/166

    A proposition is an

    elementary atomic

    sentence that may either

    be true or false but may

    not take other value .

  • 7/31/2019 De Morgans

    6/166

    Proposition are also

    called sentence orstatement after this

    introduction , let us talkabout terms and symbol

    used in propositionallogic .

  • 7/31/2019 De Morgans

    7/166

    A symbol proposition is one thatdoes not contain any other

    proposition of part . We will usethe lower case letter p, q, r., as

    symbols for simple statements or

    proposition .

  • 7/31/2019 De Morgans

    8/166

    A compound proposition is one

    with two or more simpleproposition as parts or what

    We will call components . Acomponent of compound is any

    whole proposition that is a parts

    of larger proposition ; componentsmay themselves be compounds.

  • 7/31/2019 De Morgans

    9/166

    For example , following arecompound proposition :

    it is raining and wind is blowing .Take it or leave it .

    If you work hard then you will

    rewarded.

  • 7/31/2019 De Morgans

    10/166

    An operators ( or connective ) joins simpleproposition into compounds, and joins

    Compound into larger compounds. We will usethe symbols, +, ., and todesignate the sentential connectives . They arecalled sentential connectives because they join

    sentences ( or what we are calling statement orpropositions ) . The symbol , ~ , is the onlyoperator that is not a connective ; it affectssingle statement only , and does not joinstatements into compounds.

  • 7/31/2019 De Morgans

    11/166

    Different types of

    connectives (oroperators ) used in

    propositional logic are

    given below :

  • 7/31/2019 De Morgans

    12/166

    Represent by symbols + or v.

    Disjunction means one of the

    two arguments is true or bothe.g., p + q (or p v q) means p OR

    q. It`s meaning is either p istrue , or q is true , or both

  • 7/31/2019 De Morgans

    13/166

    Represent by symbols . or &

    or . conjunction means both

    arguments are true e.g., p . q(or p & q) means p and q. Its

    meaning is both p and q aretrue .

  • 7/31/2019 De Morgans

    14/166

    Represented x by symbols or

    or

    Implication means if one argument istrue then other argument is true e.g. , p

    q(or p q or p q) means if p

    then q . Its meaning is if p is true , then

    q is true .

  • 7/31/2019 De Morgans

    15/166

    Represented by symbols or .

    Equivalence (or bi - conditional ) means

    either both argument true or both false ,e.g., p q (or p q ) means if and

    only if p is true then q is true . Its

    meaning is p q are either both true or

    both false .

  • 7/31/2019 De Morgans

    16/166

    Not a connective actually , just anoperator . Represented by - or` or

    ~ (bar).

    It is an operator that effects asingle statement only and does not

    join two or more statement e.g., ~p (or p` or p ) means NOT P . Its

    meaning is P Is False .

  • 7/31/2019 De Morgans

    17/166

    A truth table is a

    complete list ofpossible truth

    values of a

    proposition

  • 7/31/2019 De Morgans

    18/166

    The not operators

    works on singleproposition , thus it is

    also called unaryconnective sometimes .

  • 7/31/2019 De Morgans

    19/166

    If p denotes proposition , then

    its negation will be denoted by~ p or q or p . If p is 0 (false),then ~ p is 1 (true ) and if p is 1

    (true) then ~ p is 0 (false) . Thetruth table for this operation is

    shown as follows:

  • 7/31/2019 De Morgans

    20/166

    P P

    0 1

    1 0

  • 7/31/2019 De Morgans

    21/166

    Also note that

    NOT (NOT p) result into p itself

    i.e.,

    p = p

    or (p) = por ~ (~p) = p.

  • 7/31/2019 De Morgans

    22/166

    The OR connective workswith more then one

    proposition . The compound p+ q has two (2) components

    proposition (p and q), each ofwhich can be true or false .

  • 7/31/2019 De Morgans

    23/166

    So there are (2* 2) possible

    combination . The disjunctionof p with q (denoted as p + q

    or p v q ) will be truewhenever p is true or q is

    true or both are true .Consider the truth table given

    below :

  • 7/31/2019 De Morgans

    24/166

    p q p + q

    0 0 0

    0 1 1

    1 0 1

    1 1 1

    TRUTH TABLE FOR DISJUNCTION (OR)

  • 7/31/2019 De Morgans

    25/166

    The AND connective also

    works with more than one

    proposition compound The p q (or p & q) will be true

    whenever both p and q aretrue

  • 7/31/2019 De Morgans

    26/166

    p q p - q

    0 0 0

    0 1 0

    1 0 0

    1 1 1

  • 7/31/2019 De Morgans

    27/166

    In the conditional p qthe first proposition (the if -

    clause ) p here , is called the

    antecedent and the second

    proposition (then clause ) q

    here , is called consequent.

  • 7/31/2019 De Morgans

    28/166

    In the more complex conditionals

    , the antecedent and theconsequent could themselves be

    compound proposition . Theconditional p q will be false

    when p is true and q is false . For

    all other input combinations, itwill be true

  • 7/31/2019 De Morgans

    29/166

    p q p q

    0 0 1

    0 1 1

    1 0 0

    1 1 1

  • 7/31/2019 De Morgans

    30/166

    The conditional p q

    may be expressed as follow:P q = p` + q

  • 7/31/2019 De Morgans

    31/166

    A bi conditional results into false

    when one of its component

    proposition is true and other is false.

  • 7/31/2019 De Morgans

    32/166

    That is, p q will

    be 0 (false ) when p is 0and q is 1 or p is 1 and q

    is 0 . For all other inputs ,p q is 1.

  • 7/31/2019 De Morgans

    33/166

    p q p q

    0 0 1

    0 1 0

    1 0 0

    1 1 1

  • 7/31/2019 De Morgans

    34/166

    The conditional p q may be

    expressed as :p q = pq + p` . q`

  • 7/31/2019 De Morgans

    35/166

    The proposition that

    have some combinationof 1`s and 0`s in their

    truth table columns,are called cotingencies

  • 7/31/2019 De Morgans

    36/166

    The propositionshaving nothing but

    1`s in their truth

    table column, are

    called tautologies.

  • 7/31/2019 De Morgans

    37/166

    The propositions having

    nothing but 0 `s in arecalled their truth table

    column, are calledcontradictions

  • 7/31/2019 De Morgans

    38/166

    Two statements are

    consistent if and onlyif their conjunction is

    not a contradiction .

  • 7/31/2019 De Morgans

    39/166

    The converse of a conditional

    proposition is determined by

    interchanging the antecedentand consequent of given

    conditional ..

  • 7/31/2019 De Morgans

    40/166

    It results into new

    conditional . e.g .,

    converse of p q

    is q p

  • 7/31/2019 De Morgans

    41/166

    That is, if

    p : it is raining.q : sky is not clear

    .then , p q = if it

    is raining then sky is not

    clear .

  • 7/31/2019 De Morgans

    42/166

    it`s converse will be new

    conditional as givenbelow :

    q p = if sky is not

    clear then it is raining .

  • 7/31/2019 De Morgans

    43/166

    The inverse of a conditional proposition

    is another conditional having negated

    antecedent and consequent . That is ,the inverse of p q is p` q` .

    E.g., if

    p : it is raining.q : sky is not clear .

  • 7/31/2019 De Morgans

    44/166

    then , p q = if it is

    raining then sky is not clear

    it`s inverse will be a new

    conditional as given below :

    p` q` = if itis not raining then sky is not

    clear .

  • 7/31/2019 De Morgans

    45/166

    The cotnrapositive of a conditional isformed by creating another conditionalthat takes its antecedent as negated

    consequent of earlier conditional andconsequent as antecedent of earlierconditional . That is , contrapositive

    p q is ~q ~p or q por q` p`.

  • 7/31/2019 De Morgans

    46/166

    1. 0 + P= P

    0 . P = 0

    Properties of 0

    2. 1 + p = 11 . p = p

    Properties of 1

    3 . p + pq = p

    p + (p + q)= p

    absorption law .

    4. p = p involution

    5. p + p =pp . p = p

    Idempotence law

    6. p + p = 1p . p = 0

    Complementaritylaw

    7. p + q = q + pp . q = q . p

    commulative law

  • 7/31/2019 De Morgans

    47/166

    8. (p +q ) + r = p + (q + q)

    (p . q ) . r = p . (q. r)

    Associative Law

    9.p . (q + r ) = (p .q) + (p .r)

    p + (q . r ) = (p +q ). (p + r)p + p q = p + q

    Distributive Law

    10 . p + q = p . qp . q = p + q

    De Morgan`s Law

    11. p q = p + q Conditional

    Elimination

    12. p q = (p q ) . (q p ) Bi - ConditionalElimination

  • 7/31/2019 De Morgans

    48/166

    Construction a truth table for the expression(A . ( A + B) ). What single term

    Is the expression equivalent to ?

    A B A + B (A . (A + B))

    0 1 0 0

    0 1 1 0

    1 0 1 1

    1 1 1 1

  • 7/31/2019 De Morgans

    49/166

    Using truth table, prove p qis equivalent to ~ p ~ q

    p q ~q ~ p p q ~ p ~q

    0 0 1 1 1 1

    0 1 0 1 1 1

    1 0 1 0 0 0

    1 1 0 0 1 1

  • 7/31/2019 De Morgans

    50/166

    p q p p q p + q

    0 0 1 1 1

    O 1 1 1 1

    1 0 0 0 0

    1 1 0 1 1

  • 7/31/2019 De Morgans

    51/166

    Prove that p q = q p

    p q p q q p

    0 0 1 1

    0 1 0 0

    1 0 0 0

    1 1 1 1

  • 7/31/2019 De Morgans

    52/166

    Prove that p q = (q p) . ( q p ).

    P q p q p q q p (p q) . (q p)

    0 0 1 1 1 1

    0 1 0 1 0 0

    1 0 0 0 1 0

    1 1 1 1 1 1

  • 7/31/2019 De Morgans

    53/166

    Consider some simple proposition

    A : it is raining.B : wind is blowing .

    C : I am not driving.

  • 7/31/2019 De Morgans

    54/166

    1. A V B : it is raining and wind isblowing

    2. ~ B : wind is not blowing .3. ~ A . C : It is not raining and I

    am not driving ,

    4. A. ~ c : it is raining and I amnot driving

    5. A + B . C : it is raining or wind

    is blowing and I amnot driving .

    Prove that x + 1 is a tautology

  • 7/31/2019 De Morgans

    55/166

    Prove that x + 1 is a tautology.

    x 1 x + 1

    0 1 1

    1 1 1

  • 7/31/2019 De Morgans

    56/166

    Prove that x + x ` is a tautology andx . X ` is a contradiction

    x x` x + x` x . X`

    0 1 1 0

    1 0 1 o

  • 7/31/2019 De Morgans

    57/166

    Before we start discussion abo utlogical operators, let us first

    understand what a truth table is.

    For example, following logicalstatements can have only one of the

    two values (TRUE (YES) orFALSE (NO))

  • 7/31/2019 De Morgans

    58/166

    1.I WANT TO HAVE

    TEA.2.TEA IS READLY

    AVABILABLE.

  • 7/31/2019 De Morgans

    59/166

    Truth table is a table which

    represents all the possiblevalue of logical variables /

    statements along with all thepossible results of the given

    combinations of values

  • 7/31/2019 De Morgans

    60/166

    X Y R

    1 1 1

    1 0 0

    0 1 0

    0 0 0

  • 7/31/2019 De Morgans

    61/166

    1Represent true value and 0

    represent false value .

    2This is a truth table i,e.,table of truth values of truth

    functions.

  • 7/31/2019 De Morgans

    62/166

    If result of any logical

    statement or expression is

    always TRUE or I , it iscalled Tautology and if the

    result is always FALSE or 0it is called

    FALLACY

  • 7/31/2019 De Morgans

    63/166

    Now let us proceed with our

    discussion about logical operators I,e.,

    1. NOT operator2. OR operator3. AND operator

    O O O

  • 7/31/2019 De Morgans

    64/166

    NOT OPERATORthis operator operates onsingle variable and

    operation performed by notoperator is called

    complementation and thesymbol we use for it (bar) .

    Thus x means complement of x

  • 7/31/2019 De Morgans

    65/166

    Thus x means complement of x

    and yz means complement of y z

    . As we know, the variables used inBoolean equations have unique

    characteristics that they may

    assume only one of two possiblevalues 0 and 1 , where 0 denotes

    FALSE and 1 denotes TRUE value. Thus the complement operation

    can be defined quit simply .

    0 = 1

  • 7/31/2019 De Morgans

    66/166

    0 = 1

    1 = 0

    Truth table for not operator

    x x

    0 11 0

    S l h b l l

  • 7/31/2019 De Morgans

    67/166

    Several other symbol e.g ~ , are also usefor complementation symbol . If ~ is used

    then ~ x is read is negation of x and ifsymbol is used then x is read complementof x .

    x

    x x

  • 7/31/2019 De Morgans

    68/166

    Not operation is singular

    or unary operation as itoperates on single variable .

    Venn diagram for x is givenabove where shaded area

    depicts x

  • 7/31/2019 De Morgans

    69/166

    A second important

    operator in Boolean algebrais or operator which denotes

    operation called logical

    addition and the symbol weuse for it is + .

  • 7/31/2019 De Morgans

    70/166

  • 7/31/2019 De Morgans

    71/166

    0 + 0 = 0

    0 + 1 = 11 + 0 = 1

    1 + 1 = 1

    T th t bl f OR t

  • 7/31/2019 De Morgans

    72/166

    Truth table for OR operator

    X Y X + y0 0 0

    0 1 11 0 1

    1 1 1

  • 7/31/2019 De Morgans

    73/166

    AND operator perform another

    important operation of Boolean

    algebra called logical multiplicationand the symbol for AND operation

    is (.) dot . Thus x . Y will be

    read as x AND Y . The rules forand operation are :

  • 7/31/2019 De Morgans

    74/166

    0. 0 = 0

    0 . 1 = 01. 0 = 0

    1 . 1 = 0

    T th t bl f AND t

  • 7/31/2019 De Morgans

    75/166

    Truth table for AND operator

    X Y X . Y

    0 0 00 1 0

    1 0 01 1 1

    V di f X Y i i b l

  • 7/31/2019 De Morgans

    76/166

    Venn diagram for X . Y is given belowwhere shaded area depicts (X .Y)

    YX

    Shaded portionshows

    X . Y

  • 7/31/2019 De Morgans

    77/166

    Logical variables are

    combined by mean of logical

    operation (AND, OR, NOT )

    to form Boolean expression .

    For example , x + y . Z + zis a Boolean expression .

  • 7/31/2019 De Morgans

    78/166

    X Y Z0 0 0

    0 0 1

    0 1 0

    0 1 1

    1 0 0

    1 0 1

    1 1 0

    1 1 1

  • 7/31/2019 De Morgans

    79/166

    X Y Z Y . Z

    0 0 0 0

    0 0 1 0

    0 1 0 0

    0 1 1 1

    1 0 0 0

    1 0 1 0

    1 1 0 0

    1 1 1 1

  • 7/31/2019 De Morgans

    80/166

    X Y Z Y . Z Y Z0 0 0 0 1

    0 0 1 0 1

    0 1 0 0 10 1 1 1 0

    1 0 0 0 1

    1 0 1 0 11 1 0 0 1

    1 1 1 1 0

  • 7/31/2019 De Morgans

    81/166

    X Y Z Y . Z YZ X + YZ

    0 0 0 0 1 1

    0 0 1 0 1 1

    0 1 0 0 1 1

    0 1 1 1 0 0

    1 0 0 0 1 1

    1 0 1 0 1 1

    1 1 0 0 1 1

    1 1 1 1 0 1

  • 7/31/2019 De Morgans

    82/166

    X Y XY X + XY

    0 0 0 0

    0 1 0 0

    1 0 0 11 1 1 1

  • 7/31/2019 De Morgans

    83/166

    X Y X+Y (X+Y) X Y XY

    0 0 0 1 1 1 10 1 1 0 1 0 0

    1 0 1 0 0 1 01 1 1 0 0 0 0

    PREPARE A TABLE OF COMBINATIONS FOR THE FOLLOWING BOOLEAN

  • 7/31/2019 De Morgans

    84/166

    PREPARE A TABLE OF COMBINATIONS FOR THE FOLLOWING BOOLEANALGEBRA EXPRESSIONS.

    1.XY+XY

    2.XYZ+XYZ

    3.XYZ+XY

  • 7/31/2019 De Morgans

    85/166

    1. x y + x y is a 2 variable expression , its truth table asfollows :

    X Y X Y X Y X Y X Y+ XY

    0 0 1 1 1 0 1

    0 1 1 0 0 1 1

    1 0 0 1 0 0 0

    1 1 0 0 0 0 0

    b XYZ + X Y Z

  • 7/31/2019 De Morgans

    86/166

    b. XYZ + X Y Z

    Truth Table

    X Y Z X Y Z XYZ X Y Z XYZ + X Y Z

    0 0 0 1 1 1 0 0 0

    0 0 1 1 1 0 0 1 1

    0 1 0 1 0 1 0 0 0

    0 1 1 1 0 0 0 0 0

    1 0 0 0 1 1 0 0 0

    1 0 1 0 1 0 0 0 0

    1 1 0 0 0 1 1 0 1

    1 1 1 0 0 0 0 0 0

    c. X Y Z + X Y

  • 7/31/2019 De Morgans

    87/166

    Truth TableX Y Z X Y Z X Y Z XY X Y Z + XY

    0 0 0 1 1 1 0 0 0

    0 0 1 1 1 0 0 0 0

    0 1 0 1 0 1 1 0 1

    0 1 1 1 0 0 0 0 0

    1 0 0 0 1 1 0 1 11 0 1 0 1 0 0 1 1

    1 1 0 0 0 1 0 0 0

    1 1 1 0 0 0 0 0 0

    A. X (Y + Z ) + X Y

  • 7/31/2019 De Morgans

    88/166

    Truth Table

    X Y Z Y Z ( Y +Z) X (Y + Z) XY X (Y + Z )+ XY0 0 0 1 1 1 0 0 0

    0 0 1 1 0 1 0 0 0

    0 1 0 0 1 1 0 0 0

    0 1 1 0 0 0 0 0 0

    1 0 0 1 1 1 1 1 1

    1 0 1 1 0 1 1 1 1

    1 1 0 0 1 1 1 0 1

    1 1 1 0 0 0 0 0 0

    B. XY (Z + YZ ) + Z Truth Table

  • 7/31/2019 De Morgans

    89/166

    B. XY (Z YZ ) Z Truth Table

    X Y Z Y Z YZ Z + YZ XY XY(Z +YZ) XY (Z + YZ )+ Z

    0 0 0 1 1 0 0 0 0 1

    0 0 1 1 0 0 1 0 0 0

    0 1 0 0 1 1 1 0 0 1

    0 1 1 0 0 0 1 0 0 0

    1 0 0 1 1 0 0 1 0 1

    1 0 1 1 0 0 1 1 1 1

    1 1 0 0 1 1 1 0 0 1

    1 1 1 0 0 0 1 0 0 0

    C . A [ (B + C ) + C ] Truth Table

  • 7/31/2019 De Morgans

    90/166

    C . A [ (B + C ) + C ] Truth Table

    A B C B C ( B + C ) ( B + C) + C A [ (B + C) + C ]

    0 0 0 1 1 1 1 0

    0 0 1 1 0 1 1 0

    0 1 0 0 1 0 1 0

    0 1 1 0 0 1 1 0

    1 0 0 1 1 1 1 1

    1 0 1 1 0 1 1 1

    1 1 0 0 1 0 1 1

    1 1 1 0 0 1 1 1

  • 7/31/2019 De Morgans

    91/166

    Gates are digital (two - state )circuits because the input and

    output signals are either low

    voltage ( denotes 0 ) or highvoltage (denotes 1 ). Gates are

    often called logic circuits becausethey can be analyzed with Boolean

    algebra

  • 7/31/2019 De Morgans

    92/166

    A Gate is simply an

    electronic circuit whichoperates on one or

    more signals t o producean output signal .

  • 7/31/2019 De Morgans

    93/166

    Inverter (NOT gate )

    OR gateAND gate

  • 7/31/2019 De Morgans

    94/166

    An inverter (NOT Gate ) is

    a gate with only one inputsignal and one output

    signal ; the output state isalways the opposite of the

    input state

  • 7/31/2019 De Morgans

    95/166

    An inverter is also called a NOT

    gate because the output is not

    the same as the input . The

    output is sometimes called thecomplement (opposite) of the

    input . Following tablessummaries the operation:

  • 7/31/2019 De Morgans

    96/166

    X YLow HighHigh Low

  • 7/31/2019 De Morgans

    97/166

    X Y

    0 1

    1 0

    A low input I e 0 produce high output

  • 7/31/2019 De Morgans

    98/166

    A low input I,e., 0 produce high output

    I,e. 1, and vice versa. The symbol for

    inverter is given in:

    x x

    NOT GATE SYMBOL

  • 7/31/2019 De Morgans

    99/166

    The OR Gate has two or moreinput signals but only one

    output signal . If any of theInput signals is 1 (high ). The

    output signal is 1 (high)

  • 7/31/2019 De Morgans

    100/166

    If all inputs are 0

    then output is also 0. If one or more

    inputs are 1, the

    output is 1 TWO INPUT OR GATE

  • 7/31/2019 De Morgans

    101/166

    X Y F

    0 0 00 1 1

    1 0 11 1 1

    F = X + Y

  • 7/31/2019 De Morgans

    102/166

    X Y Z F

    0 0 0 0

    0 0 1 10 1 0 1

    0 1 1 1

    1 0 0 1

    1 0 1 1

    1 1 0 1

    1 1 1 1

    F = X + Y + Z

  • 7/31/2019 De Morgans

    103/166

    A

    B

    F

    Two input OR gate

  • 7/31/2019 De Morgans

    104/166

    AB FC

    Three input OR gate

  • 7/31/2019 De Morgans

    105/166

    A

    B FC

    Four input OR gate

    D

  • 7/31/2019 De Morgans

    106/166

    The AND Gate can have two ormore then two input signals

    and produce an output signal .When all the input are 1 i.e,

    that is high then output is 1

    otherwise output is 0 only .

  • 7/31/2019 De Morgans

    107/166

    X Y F0 0 0

    0 1 01 0 0

    1 1 1

    F X Y

  • 7/31/2019 De Morgans

    108/166

    X Y Z F

    0 0 0 0

    0 0 1 0

    0 1 0 0

    0 1 1 0

    1 0 0 0

    1 0 1 01 1 0 0

    1 1 1 1

    F = X Y Z

  • 7/31/2019 De Morgans

    109/166

    2 Input AND gate

    A

    BF

  • 7/31/2019 De Morgans

    110/166

    3 Input AND gate

    A

    B F

    C

  • 7/31/2019 De Morgans

    111/166

    4 Input AND gate

    A

    B FCD

  • 7/31/2019 De Morgans

    112/166

    Boolean algebra being a system of

    mathematics consists of fundamentallaws that are used to build a

    workable cohesive framework uponwhich are based the theorems of

    Boolean algebra . These fundamental

    laws are known as Basic postulatesof Boolean

  • 7/31/2019 De Morgans

    113/166

    1. if x = 0 then x = 1; and if x = 1 then x = 0

    2. OR Relation s (Logical Addition)

    0 + 0 = 0 00

    0 + 1 = 1

    1 + 0 = 1

    1 + 1 = 1

    OR

    OR

    OR

    OR

    0

    1

    1

    1

    01

    1

    0

    11

  • 7/31/2019 De Morgans

    114/166

    0 . 0 = 0

    0 . 1 = 1

    1 . 0 = 1

    1 . 1 = 1

    AND

    AND

    AND

    AND

    0

    0

    0

    1

    0

    1

    11

    0

    0

    1

    0

  • 7/31/2019 De Morgans

    115/166

    0 = 1

    1 = 0

    0

    01

    1

    NOT

    NOT

  • 7/31/2019 De Morgans

    116/166

    This is a very important principle used inBoolean algebra . This state s that startingwith Boolean relation can be derived by .

    1. changing each OR sign ( + ) to an AND sign(.)

    2. changing each AND sign ( . ) to an OR sign

    (+)in3. Replacing each 0 by 1 and each 1 by 0 .

    The derived relation

  • 7/31/2019 De Morgans

    117/166

    using dualityprincipal is called

    dual Of originalexpression.

    For instance , we take postulate II related

  • 7/31/2019 De Morgans

    118/166

    to logical addition , which states

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

    C. 1 + 0 = 1

    D. 1 + 1 = 1

    Now working according to above

    d l h d d

  • 7/31/2019 De Morgans

    119/166

    guidelines , + is changed to. And 0

    s are replaced by 1s , these becomeA. 1 . 1 = 1

    B. 1 . 0 = 0C. 0 . 1 = 0

    D. 0 . 0 = 0

  • 7/31/2019 De Morgans

    120/166

    1. 0 + x = x

    2. 1 + x = 1

    3. 0 . x = 0

    1 x x

    OR 00

    0

    OR 11

    X

    AND 1

    0

    X

    AND X1

    X

  • 7/31/2019 De Morgans

    121/166

    0 X R

    0 0 0

    0 1 1

  • 7/31/2019 De Morgans

    122/166

    1 X R

    1 0 1

    1 1 1

  • 7/31/2019 De Morgans

    123/166

    0 X R

    0 0 0

    0 1 0

  • 7/31/2019 De Morgans

    124/166

    1 X R

    1 0 0

    1 1 1

  • 7/31/2019 De Morgans

    125/166

    OR

    X

    X

    X

    A. X + X = X i,e;

    (gate representation for (a))

    B. X . X = X i,e;

  • 7/31/2019 De Morgans

    126/166

    ,e;

    AND XX

    X

    (gate representation for (b))

  • 7/31/2019 De Morgans

    127/166

    X X R

    0 0 01 1 1

    0 + 0 = 01 + 1 = 1

  • 7/31/2019 De Morgans

    128/166

    X X R

    0 0 01 1 1

    0 . 0 = 01 . 1 = 1

  • 7/31/2019 De Morgans

    129/166

    (X) = X

    X

    X X = X

  • 7/31/2019 De Morgans

    130/166

    X X R

    0 1 0

    1 0 1

  • 7/31/2019 De Morgans

    131/166

    A. X + X = 1

    OR

    XX X + X = 1

    ( gate representation of (a)

  • 7/31/2019 De Morgans

    132/166

    B. X . X = 0

    ANDX

    X X . X = 0

    ( gate representation of (b)

  • 7/31/2019 De Morgans

    133/166

    X X X + X

    0 1 1

    1 0 1

  • 7/31/2019 De Morgans

    134/166

    X X X . X

    0 1 0

    1 0 0

  • 7/31/2019 De Morgans

    135/166

    A. X + Y = Y + X

    ORX

    Y

    R = ORYXR

    B. X . Y = Y . X

  • 7/31/2019 De Morgans

    136/166

    ANDX

    Y

    R ANDYX

    R

    =

    Truth Table X + Y = Y + X

  • 7/31/2019 De Morgans

    137/166

    X Y X + Y Y + X

    0 0 0 0

    0 1 1 11 0 1 1

    1 1 1 1

    Truth Table for X . Y = Y . X

  • 7/31/2019 De Morgans

    138/166

    X Y X . Y Y . X

    0 0 0 0

    0 1 0 01 0 0 0

    1 1 0 1

  • 7/31/2019 De Morgans

    139/166

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

    ORYZ

    X

    OR =

    R

    Y + Z

    ORXZ

    Z

    ORR

    X + Y

    B. X (YZ) = (X Y) Z

  • 7/31/2019 De Morgans

    140/166

    ( ) ( )

    AND

    Y

    Z

    X

    AND =R

    Y Z

    ANDXY

    Z

    ANDR

    X Y

    Truth Table for X + (Y + Z) = (X + Y ) + Z

  • 7/31/2019 De Morgans

    141/166

    X Y Z Y + Z X + Y X + (Y + Z ) (X + Y )+ Z

    0 0 0 0 0 0 0

    0 0 1 1 0 1 1

    0 1 0 1 1 1 1

    0 1 1 1 1 1 1

    1 0 0 0 1 1 1

    1 0 1 1 1 1 11 1 0 1 1 1 1

    1 1 1 1 1 1 1

  • 7/31/2019 De Morgans

    142/166

    A. X (Y+Z) = X Y+ XZ

    OR

    Y

    Z

    Y + Z

    ANDX R

    =

    AND

    AND

    OR

    X

    Y

    XY

    XY

    R

    Z

    B X +YZ = ( X +Y)( X+Z)

  • 7/31/2019 De Morgans

    143/166

    B. X +YZ ( X +Y)( X+Z)

    ANDY

    Z

    Y . Z

    ORXR

    =

    OR

    OR

    AND

    X

    Y

    X + Y

    X+Y

    R

    Z

    Truth Table for X + (Y + Z) = X Y + X Z

    X Y Z Y Z X Y XZ X(Y Z ) XY XZ

  • 7/31/2019 De Morgans

    144/166

    X Y Z Y + Z X Y XZ X(Y + Z ) XY + XZ

    0 0 0 0 0 0 0 0

    0 0 1 1 0 0 0 0

    0 1 0 1 1 0 0 0

    0 1 1 1 0 0 0 0

    1 0 0 0 0 0 0 0

    1 0 1 1 0 1 1 1

    1 1 0 1 1 0 1 1

    1 1 1 1 1 1 1 1

  • 7/31/2019 De Morgans

    145/166

    A. X + XY = X

    ANDY

    Z

    ORX Y

    X

    X

    B X (X +Y) X

  • 7/31/2019 De Morgans

    146/166

    B. X (X + Y) = X

    ORY

    ANDX+ Y

    X

    X

    Truth Table for X + XY = X

  • 7/31/2019 De Morgans

    147/166

    X Y XY X + XY

    0 0 0 0

    0 1 0 0

    1 0 0 1

    1 1 1 1

    Column X and X + XY are identical . Henced Al i b d l b i ll

  • 7/31/2019 De Morgans

    148/166

    proved . Also it can be proved algebraically

    as

    L. H.S = X + XY

    = X (1 + Y)

    Putting 1 + y = 1X . 1 = X = R.H.S

    (b)Since rule (b) is dual of rule (a) it is also proved

  • 7/31/2019 De Morgans

    149/166

    .

    L.H.S. =X (X +Y) = X . X + XY

    = X . X + XY

    = X + XY= X ( 1 + Y )

    = X . 1= X

    = R. H.S

    (X.X=X: Indempotence Law)

    (using 1 + y =1 properties of 0 , 1)

    (X .1 = X USING PROPERTIES OF0,1)

    X XY X Y (Thi i h hi d di ib i l )

  • 7/31/2019 De Morgans

    150/166

    X + XY = X + Y (This is the third distributive law )

    AND

    OR = OR

    x

    y

    RRXY

    y

    X

    NOT

    X + XY = X + Y

  • 7/31/2019 De Morgans

    151/166

    PROOF L.H.S = X + X Y= X . 1 + X Y= X (1 + Y ) + XY= X + XY + XY

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

    R. H . S PROVED

    (X. 1 = X PROPERTY OF 0 AND 1)

    (1+Y= 1 PROPERTY OF 0 AND 1

    (X +X =1 COMPLEMENTARITY LAW)

    (Y .1 =Y property of 0 and 1)

    1 0 + X = XPROPERTIES OF 0

    2 0 . X = 0

    3 1 + X = 1 PROPERTIES OF 1

    4 1 X = X

  • 7/31/2019 De Morgans

    152/166

    BOOLEAN ALGEBRA

    RULES

    4 1 . X = X

    5 X + X = X INDEMPOTENCE LAW

    6 X . X = X

    7 X = X INVOLUTION

    8 X + X = 1 COMPLEMENTARITY LAW

    9 X . X = 0

    10 X + Y = Y + X COMMULATIVE LAW

    11 X . Y = Y.X

    12 X + (Y + Z ) = (X + Y ) + Z ASSOCIATIVE LAW

    13 X (YZ ) = (XY) Z

    14 X (Y + Z ) = XY + XZ DISTRIBUTIVE LAW

    15 X (Y + Z ) = (X + Y ) ( X + Z)

    16 X + XY = X ABSORPTION LAW

    17 X * ( X + Y ) = X

    18 X + XY = X + Y

    I h

  • 7/31/2019 De Morgans

    153/166

    It states that x + y = x y

    OR

    ANDxy

    R

    NOT

    X

    Y

    NOT

    NOT

    X

    Y

    R

    PROOFTo prove this theorem , we need

  • 7/31/2019 De Morgans

    154/166

    to recall complementarity laws, which

    state thatX + X = 1 and X . X = 0

    I,e, a logical variable / expression

    when added with its complementproduces the output as 1 and when

    multiplied with its complement

    produces the output as 0 .

    Now to prove DeMorgan s first theorem , we willuse complementarity laws .

    let us assume that P = X + Y where , p , x , y

  • 7/31/2019 De Morgans

    155/166

    are logical variables .

    Then according to complementation law.P + P = 1 and P . P = 0

    That means, if P , X , Y are boolean variablesthen this complementarity law must hold forvariables P . In other words , if p i.e X + Y = X Ythen

    (x + y ) + x y must be equal to 1 .( x + y ) . X y must be equal to 0

  • 7/31/2019 De Morgans

    156/166

    let us prove the first part , i, e.

    (X + Y) + ( X Y ) = 1

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

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

    (Ref. X + YZ = (X +Y ) (X + Z ))

    (Ref . X + X = 1)(ref . 1 + x = 1)

    So part is proved .Now let us proved second part I,e.

  • 7/31/2019 De Morgans

    157/166

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

    = X Y X + X Y Y= X X Y + X Y Y= 0 . Y + X . 0= 0 + 0 = 0

    So, second part is also proved , thus : X + Y = X Y

    (ref X (YZ ) Z= (XY) Z)

    (Ref . X (Y + Z )=XY + XZ )

    (Ref . X .X = 0)

    It t t th t

  • 7/31/2019 De Morgans

    158/166

    It states that x . y = x + y

    AND

    ANDxy

    R

    NOT

    XNOT

    X

    Y

    RX . Y

    NOT

    Proof

    If XY s complemrnt is X + Y then it must be true that

    1. XY + ( X + Y ) = 1 AND

  • 7/31/2019 De Morgans

    159/166

    2. XY ( X + Y ) = 0

    L.H.S = XY + ( X + Y )= (X + Y + X ) . (X + Y + Y)= ( X + X + Y ) . ( X + Y + Y )

    = ( 1 + Y ) . (X + 1 )= 1 . 1= 1 = R.H.S

    (ref X + Y = Y + X )Ref.(X + Y )( X + Z ) = X + YZ)

    ref X + X = 1ref 1 + x = 1

    Now the second part i ,e

  • 7/31/2019 De Morgans

    160/166

    L.H.S = XY . ( X + Y )= X Y X . X Y Y= X X Y . X Y Y

    = 0 . Y + X . 0= 0 + 0 = 0 = R.H.SXY . ( X + Y) = 0 and XY + (X + Y ) = 1

    ref X (Y + Z ) = XY + XZ

    ref ( X . X = 0 )

    XY . ( x + y ) = 0

    Although the identifies above represent DeMorgan s theoremthe transformations more easily performed by following these step:

  • 7/31/2019 De Morgans

    161/166

    y p y g p

    1. complement the entire function2. change all the ANDs (.) to ORs (+) and all

    the ORs (+) to ANDs (.)

    3. complements each of the individual variables .

    Break the line , charge the sign to demorganize aBoolean expression

  • 7/31/2019 De Morgans

    162/166

    AB + A + AB = A + B + A + AB

    = (A + B ) + ( A + AB )= ( A + B ) + (A + AB)

    = A . B . (A . AB)= A . B ( A . ( A + B ))= AB (AA + AB)

    = AB (0 + AB )= AB . 0 + ABAB = 0 + AABB= 0 + A A . 0= 0 + 0 = 0

  • 7/31/2019 De Morgans

    163/166

    FOR EXAMPLE,X + X . Y = X

    Its dual will be X . (X + Y ) = X

    (Remember change .to + and viceversa; complement 0 and 1.)Similarly (X + Y) + Z = X + ( Y +Z )

    is dual of (X . Y ) .Z = X . (Y . Z)X + 0 = X is dual of X . 1 = X

    All boolean algebra is predicated on this two for one basis

  • 7/31/2019 De Morgans

    164/166

    All boolean algebra is predicated on this two for one basis

    Example : give dual of the following result in boolleansalgebra :

    X . X = 0 for each X

    Solution : using duality principal , dual of X . X = 0 isX + X = 1 (By changing (.) to ( +) and viseversa and by replacing 1s by 0s and viceversa)

    Example : give the dual of X + 0 = X for each X .Solution : using duality principal , dual of X + 0 = X is

    X .1 = X

  • 7/31/2019 De Morgans

    165/166

    Example : state the principal of dulity in boolean algebra and give that dual of

    the boolean expression :

    (X + Y ). (X + Z ) . (Y + Z )Solution : principal of duality states that from every boolean relation, anotherboolean relation can be derived by

    1. changing each OR sign ( +) to an AND ( .) sign2. changing each AND ( .) sign to an OR ( + ) sign3. replacing each 1 by o and each 0 by 1

    The new derived relation is known as the dual of the original relation.Dual of ( X + Y) . ( X + Y ) . (Y + Z ) will be

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

  • 7/31/2019 De Morgans

    166/166