simplification of boolean expression

Upload: ashutosh-saraswat

Post on 04-Jun-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Simplification Of Boolean Expression

    1/5

    60-265 Computer Architecture I: Digital Design Fall 2010

    EXAMPLE ANSWERS

    Exercise 2 Simplification of Boolean expressions for efficient design logic

    Question 1. [ 2 marks ]

    1. Determine by means o a truth table the !ali"ity o De#organ$s theorem or three !ariables:

    %A&C'$ ( A$ ) &$ ) C$.

    A & C A$ &$ C$ A& A&C A$)&$ %A&C'$ A$)&$)C$

    0 0 0 1 1 1 0 0 1 1 1 same

    0 0 1 1 1 0 0 0 1 1 1 same

    0 1 0 1 0 1 0 0 1 1 1 same

    0 1 1 1 0 0 0 0 1 1 1 same

    1 0 0 0 1 1 0 0 1 1 1 same

    1 0 1 0 1 0 0 0 1 1 1 same

    1 1 0 0 0 1 1 0 0 1 1 same

    1 1 1 0 0 0 1 1 0 0 0 same

    *oting that the !alues in the last t+o columns are the same or all ro+s %ie. all combinations possible

    o 0 an" 1', De#organ$s theorem or three !ariables has been sho+n to be !ali". his is an eample

    o /erect In"ucti!e proo using truth tables.

    2. ist the truth table o a three-!ariable eclusi!e- %sometimes calle" 3o""$' unction:D ( A & C, +here "enotes the 4 operator.

    A & C A& A&C

    0 0 0 0 0

    0 0 1 0 1

    0 1 0 1 1

    0 1 1 1 0

    1 0 0 1 1

    1 0 1 1 0

    1 1 0 0 01 1 1 0 1

    *ote that the !alues in the last %rightmost' column are 1 i the total number o 1$s in the set A,&,C isDD 7 other+ise, i the total 1$s is e!en, the !alue is 0. For this reason, the three !ariable 4 operator

    is calle" the DD unction.

  • 8/13/2019 Simplification Of Boolean Expression

    2/5

    Question 2. [ 5 marks ]

    8impliy the ollo+ing epressions using &oolean algebra. In each case, state the Aiom %ie. /ostulate'or heorem being applie" at each step.

    For the ans+ers belo+, +e reer to the ollo+ing /ostulates an" heorems %see lecture notes':/1: Closure: here eists ,y in & such that t+o in"epen"ent operations, . %"ot' an" ) %plus' are "eine":

    ) y . y

    /2: I"entity: here eist i"entity elements 0,1 in & relati!e to the operations ) an" . , such that or e!ery in &:

    0 ) ( ) 0 ( 1 . ( . 1 (

    /9: Commutati!ity: he operations ) an" . are commutati!e or all ,y in &:

    ) y ( y ) . y ( y . /: Distributi!ity: ;ach operation ) an" . is "istributi!e o!er the other< that is, or all ,y,= in &:

    .%y)=' ( .y ) .= )%y.=' ( %)y'.%)='

    /5: Complementation: For e!ery element in & there eists an element >, calle" the complement o ,satisying:

    ) > ( 1 .> ( 0

    /6: ;istence: here eist at least t+o elements ,y in & such that ? y.

    2: For each 4 in &: 4 ) 1 ( 1 4 . 0 ( 0

    a. A ) A&

    Deri!ati!e step /ostulate

    A.1 ) A.& /2

    A%1)&' /

    A.1 2

    A /2

    Final ans+er: A

    b. A& ) A&$

    Deri!ati!e step /ostulate

    A%&)&$' /

    A.1 /5

    A /2

    Final ans+er: A

    c. A$&C ) AC

    Deri!ati!e step /ostulate

    %A$&)A'C /

    %A$)A'%&)A'C /

    1.%&)A'C /5

    %&)A'C /2

    Final ans+er: %&)A'C ( %A)&'C ( C%A)&' etc %all similar orms are e@ui!alent'.

  • 8/13/2019 Simplification Of Boolean Expression

    3/5

    ". A$& ) A&C$ ) A&C

    Deri!ati!e step /osthm

    A$& ) A&C$ ) A&C$ ) A&C I"empotent

    &%A$ ) AC$' ) A&%C$ ) C' /9, /

    &%A$ ) AC$' ) A&.1 /5

    &%A$ ) AC$' ) A& /2&%A$ ) AC$ ) A' /

    &%A$ ) A ) AC$' /9

    &%1 ) AC$' /5

    &.1 2

    & /2

    Final ans+er: &

    e. A& ) A%CD ) CD$'

    Deri!ati!e step /ostulate

    A& ) AC%D ) D$' /

    A& ) AC.1 /5

    A& ) AC /2

    A%& ) C' /

    Final ans+er: A%& ) C' *;: his ans+er is simpler than the secon" last line abo!e "ue

    to the act that the number o operations is only 2 %one , one A*D' in the last line, !ersus 9

    %one , t+o A*D' in the secon" last line.

    . %&C$ ) A$D'%A&$ ) CD$'

    Deri!ati!e step /ostulate

    &C$%A&$ ) CD$' ) A$D%A&$ ) CD$' /

    &C$A&$ ) &C$CD$ ) A$DA&$ ) A$D CD$ /

    A&&$C$ ) &CC$D$ ) AA$&$D ) A$CDD$ /9

    A.0.C$ ) &.0.D$ ) 0.&$D ) A$C.0 /5

    0 ) 0 ) 0 ) 0 2

    0 /2

    Final ans+er: 0 *;: It is interesting %to say the least' that a complicate" circuit "esignin!ol!ing many inputs may simpliy to a !ery simple circuit, as in this case +here the output is

    0 regar"less o the inputs.

  • 8/13/2019 Simplification Of Boolean Expression

    4/5

    Question 3. [ 3 marks ]

    1. Bsing De#organ$s theorem, sho+ that:

    a. %A ) &'$%A$ ) &$'$ ( 0

    %A ) &'$%A$ ) &$'$ ( %%A ) &' ) %A$ ) &$''$

    ( %%A ) A$' ) %& ) &$''$ ( % 1 ) 1 '$( 1$( 0 ;D

    b. A ) A$& ) A$&$ ( 1

    A ) A$& ) A$&$ ( A ) A$%& ) &$'( A ) A$%&$&'$

    ( A ) A$%0'$

    ( A ) A$.1

    ( A ) A$( %A$A'$

    ( %0'$

    ( 1 ;D

    *;: his eample is notably ineicient in ho+ a higher or"er theorem, such as

    "e#organ$s theorem, is use" to get the result. he same result coul" ob!iously ha!e beenachie!e" in e+er steps by applying the postulates "irectly, or simpler theorems.

    2. Ei!en the &oolean epression: F ( 4$ ) 4G$

    &eore beginning, note that F ( %4$ ) 4G$' ( %4$)G$' %see eamples abo!e'.

    a. Deri!e an algebraic epression or the complement F$.

    F$ ( %4$ ) 4G$'$ ( %4$'$.%4G$'$( %4$$ ) $'%4$ ) $ ) G$$'

    ( %4 ) $'%4$ ) $ ) G'

    Hhich simpliies to:

    ( %4)$'4$ ) %4)$'$ ) %4)$'G

    ( 4$$ ) 4$ ) $ ) 4G ) $G( $ ) 4G ) $G( $ ) 4G

    It is possible to sho+ this more "irectly, using:F$ ( %%4$)G$''$ ( %4$)G$'$ ) $ "e#organJ ( 4G ) $ "e#organJ

  • 8/13/2019 Simplification Of Boolean Expression

    5/5

    b. 8ho+ that FF$ ( 0. %Bse algebra, not truth tables'

    I +e start +ith the simpliie" orm o F ( %4$)G$', then:

    FF$ ( %%4$)G$''.%$ ) 4G'

    ( %4G'$%$ ) 4G' "e#organ, Distributi!eJ

    ( %4G'$%4G' Complement, I"entityJ( 0 ;D ComplementJ

    c. 8ho+ that F ) F$ ( 1. %Bse algebra, not truth tables'

    I +e start +ith the simpliie" orm o F ( %4$)G$', then:

    F)F$ ( %4$)G$' ) %$ ) 4G'

    ( %4G'$ ) %$ ) 4G'

    ( $ ) 4G ) %4G'$

    ( $) %4G'$ ) %%4G' ) %4G'$'%4G ) '( $) %4G'$ ) %4G ) '

    ( %)$' ) %%4G' ) %4G'$'

    ( 1 ) 1( 1 ;D

    K All inormation on this +ebsite is Copyright K 2010 by obert D. Lent. All rights reser!e".