Boolen Alger Boolen Alger A Boolen lger is set B of vlues together with: - two inry opertions, commonly denoted y + nd, - unry opertion, usully denoted y ˉ or ~ or, - two elements usully clled zero nd one, such tht for every element of B: nd In ddition, certin ioms must e stisfied: - closure properties for oth inry opertions nd the unry opertion - ssocitivity of ech inry opertion over the other, - commuttivity of ech ech inry opertion, - distriutivity of ech inry opertion over the other, - sorption rules, - eistence of complements with respect to ech inry opertion We will ssume tht hs higher precedence thn +; however, this is not generl rule for ll Boolen lgers. Computer Orgniztion 25-25 McQuin
Boolen Alger Computer Orgniztion 2 25-25 McQuin Aioms of Boolen Alger Associtive Lws: for ll, nd c in B, ( ( c c ( ( c c ( ( ( c c ( ( ( c c ( ( Commuttive Lws: for ll nd in B, Distriutive Lws: for ll, nd c in B, Asorption Lws: for ll, nd c in B, Eistence of Complements: for ll in B, there eists n element ā in B such tht
Emples of Boolen Algers Boolen Alger 3 The clssic emple is B = {true, flse} with the opertions AND, OR nd NOT. An isomorphic emple is B = {, } with the opertions +, nd ~ defined y: + * ~ Given set S, the power set of S, P(S is Boolen lger under the opertions union, intersection nd reltive complement. Other, interesting emples eist Computer Orgniztion 25-25 McQuin
More Properties It's lso possile to derive some dditionl fcts, including: - the elements nd re unique - the complement of n element is unique - nd re complements of ech other Boolen Alger 4 Computer Orgniztion 25-25 McQuin
DeMorgn's Lws & More Boolen Alger 5 DeMorgn's Lws re useful theorems tht cn e derived from the fundmentl properties of Boolen lger. For ll nd in B, Of course, there s lso doule-negtion lw: And there re idempotency lws: Boundedness properties: Computer Orgniztion 25-25 McQuin
Logic Epressions nd Equtions Boolen Alger 6 A logic epression is defined in terms of the three sic Boolen opertors nd vriles which my tke on the vlues nd. For emple: z : y y y : ( 2 ( 2 3 ( 2 3 A logic eqution is n ssertion tht two logic equtions re equl, where equl mens tht the vlues of the two epressions re the sme for ll possile ssignments of vlues to their vriles. For emple: y y y y Of course, equtions my e true or flse. Wht out the one ove? Computer Orgniztion 25-25 McQuin
Boolen Alger Computer Orgniztion 7 25-25 McQuin Why do they cll it "lger"? A Boolen epression cn often e usefully trnsformed y using the theorems nd properties stted erlier: y y y y y y y y Tht is reltively simple emple of reduction. Try showing the following epressions re equl: z y z y
Why do they cll it "lger"? Here's nother tht hppens to e relted to inry ddition: Boolen Alger 8 Z A B C A B C A B C A B C Given A B C A B C A B C A B C A B C A B C Idempotence A B C A B C A B C A B C A B C A B C Commuttivity, Associtivity A AB C AC B B AB C C Commuttivity, Distriutivity B C AC A B Complements AC B C AB Boundedness Computer Orgniztion 25-25 McQuin
Tutologies, Contrdictions & Stisfiles Boolen Alger 9 A tutology is Boolen epression tht evlutes to true ( for ll possile vlues of its vriles. A contrdiction is Boolen epression tht evlutes to flse ( for ll possile vlues of its vriles. A Boolen epression is stisfile if there is t lest one ssignment of vlues to its vriles for which the epression evlutes to true (. Computer Orgniztion 25-25 McQuin
Truth Tles Boolen Alger A Boolen epression my e nlyzed y creting tle tht shows the vlue of the epression for ll possile ssignments of vlues to its vriles: Computer Orgniztion 25-25 McQuin
Proving Equtions with Truth Tles Boolen Alger Boolen equtions my e proved using truth tles (dull nd mechnicl: c c + c ~(**c ~*~*~c Computer Orgniztion 25-25 McQuin
Proving Equtions Algericlly Boolen Alger 2 Boolen equtions my e proved using truth tles, which is dull nd oring, or using the lgeric properties: B, sorption, with lw of complements B, sorption, with lw of complements Note the dulity Computer Orgniztion 25-25 McQuin
Proving Equtions Algericlly Boolen Alger 3 B, sorption, with ( lw of complements sorption, with = Computer Orgniztion 25-25 McQuin
Sum-of-Products Form Boolen Alger 4 A Boolen epression is sid to e in sum-of-products form if it is epressed s sum of terms, ech of which is product of vriles nd/or their complements: It's reltively esy to see tht every Boolen epression cn e written in this form. Why? The summnds in the sum-of-products form re clled minterms. - ech minterm contins ech of the vriles, or its complement, ectly once - ech minterm is unique, nd therefore so is the representtion (side from order Computer Orgniztion 25-25 McQuin
Emple Boolen Alger 5 Given truth tle for Boolen function, construction of the sum-of-products representtion is trivil: - for ech row in which the function vlue is, form product term involving ll the vriles, tking the vrile if its vlue is nd the complement if the vrile's vlue is - tke the sum of ll such product terms y z F y z y z y z yz F y z y z y z y z Computer Orgniztion 25-25 McQuin
Product-of-Sums Form Boolen Alger 6 A Boolen epression is sid to e in product-of-sums form if it is epressed s product of terms, ech of which is sum of vriles: Every Boolen epression cn lso e written in this form, s product of mterms. Fcts similr to the sum-of-products form cn lso e sserted here. The product-of-sums form cn e derived y epressing the complement of the epression in sum-of-products form, nd then complementing. Computer Orgniztion 25-25 McQuin
Emple Boolen Alger 7 Given truth tle for Boolen function, construction of the product-of-sums representtion is trivil: - for ech row in which the function vlue is, form product term involving ll the vriles, tking the vrile if its vlue is nd the complement if the vrile's vlue is - tke the sum of ll such product terms; then complement the result y z F y z y z y z y z F y z y z y z y z F y z y z y z y z ( y z ( y z ( y z ( y z Computer Orgniztion 25-25 McQuin
Boolen Functions Boolen Alger 8 A Boolen function tkes n inputs from the elements of Boolen lger nd produces single vlue lso n element of tht Boolen lger. For emple, here re ll possile 2-input Boolen functions on the set {, }: A B zero nd A B or or A B nor eq B' A' nnd one Computer Orgniztion 25-25 McQuin
Universlity Any Boolen function cn e epressed using: - only AND, OR nd NOT - only AND nd NOT - only OR nd NOT - only AND nd XOR - only NAND - only NOR Boolen Alger 9 The first ssertion should e entirely ovious. The remining ones re ovious if you consider how to represent ech of the functions in the first set using only the relevnt functions in the relevnt set. Computer Orgniztion 25-25 McQuin