A Boolen lgebr is set B of vlues together with: - two binr opertions, commonl denoted b + nd, - unr opertion, usull denoted b or ~ or, - two elements usull clled ero nd one, such tht for ever element of B: + = nd = In ddition, certin ioms must be stisfied: - closure properties for both binr opertions nd the unr opertion - ssocitivit of ech binr opertion over the other, - commuttivit of ech ech binr opertion, - distributivit of ech binr opertion over the other, - bsorption rules, - eistence of complements with respect to ech binr opertion We will ssume tht hs higher precedence thn +; however, this is not generl rule for ll Boolen lgebrs. 25-2 McQuin
Aioms of Associtive Lws: for ll, b nd c in B, 2 ( + b) + c= + ( b+ c) ( b) c= ( b c) Commuttive Lws: for ll nd b in B, + b= b+ b= b Distributive Lws: for ll, b nd c in B, + ( b c) = ( + b) ( + c) ( b+ c) = ( b) + ( c) Absorption Lws: for ll, b nd c in B, + ( b) = ( + b) = Eistence of Complements: for ll in B, there eists n element ā in B such tht + = = 25-2 McQuin
Emples of s 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 b: b + b b ~ Given set S, the power set of S, P(S) is Boolen lgebr under the opertions union, intersection nd reltive complement. Other, interesting emples eist 25-2 McQuin
More Properties It's lso possible to derive some dditionl fcts, including: - the elements nd re unique - the complement of n element is unique - nd re complements of ech other 4 25-2 McQuin
DeMorgn's Lws & More 5 DeMorgn's Lws re useful theorems tht cn be derived from the fundmentl properties of Boolen lgebr. For ll nd b in B, + b= b b= + b Of course, there s lso double-negtion lw: = And there re idempotenc lws: + = = Boundedness properties: + = = += = 25-2 McQuin
Logic Epressions nd Equtions 6 A logic epression is defined in terms of the three bsic Boolen opertors nd vribles which m tke on the vlues nd. For emple: : + : ( 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 possible ssignments of vlues to their vribles. For emple: ( + ) ( ) + + = Of course, equtions m be true or flse. Wht bout the one bove? 25-2 McQuin
7 25-2 McQuin Wh do the cll it "lgebr"? A Boolen epression cn often be usefull trnsformed b using the theorems nd properties stted erlier: ( ) ( ) ( ) ( ) + = + = + + + = + + This is reltivel simple emple of reduction. Tr showing the following epressions re equl: ( ) + = +
Tutologies, Contrdictions & Stisfibles 8 A tutolog is Boolen epression tht evlutes to true () for ll possible vlues of its vribles. + b+ b+ b+ b A contrdiction is Boolen epression tht evlutes to flse () for ll possible vlues of its vribles. A Boolen epression is stisfible if there is t lest one ssignment of vlues to its vribles for which the epression evlutes to true (). b+ b 25-2 McQuin
Truth Tbles 9 A Boolen epression m be nled b creting tble tht shows the vlue of the epression for ll possible ssignments of vlues to its vribles: b b b b+ b 25-2 McQuin
Proving Equtions with Truth Tbles Boolen equtions m be proved using truth tbles (dull nd mechnicl): += + b c= + b+ c b c ~(*b*c) ~*~b*~c 25-2 McQuin
Proving Equtions Algebricll Boolen equtions m be proved using truth tbles, which is dull nd boring, or using the lgebric properties: B, = ( ) bsorption, with = + b= = lw of complements B, + = ( ) bsorption, with = + b= = + lw of complements Note the dulit 25-2 McQuin
Proving Equtions Algebricll 2 B, + = = + bsorption, with b= = + ( + ) lw of complements = + bsorption, with b = 25-2 McQuin
Sum-of-Products Form 3 A Boolen epression is sid to be in sum-of-products form if it is epressed s sum of terms, ech of which is product of vribles nd/or their complements: b+ b It's reltivel es to see tht ever Boolen epression cn be written in this form. Wh? The summnds in the sum-of-products form re clled minterms. - ech minterm contins ech of the vribles, or its complement, ectl once - ech minterm is unique, nd therefore so is the representtion (side from order) 25-2 McQuin
Emple 4 Given truth tble 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 vribles, tking the vrible if its vlue is nd the complement if the vrible's vlue is - tke the sum of ll such product terms F F = + + + 25-2 McQuin
Product-of-Sums Form 5 A Boolen epression is sid to be in product-of-sums form if it is epressed s product of terms, ech of which is sum of vribles: ( + b) ( + b) Ever Boolen epression cn lso be written in this form, s product of mterms. Fcts similr to the sum-of-products form cn lso be sserted here. The product-of-sums form cn be derived b epressing the complement of the epression in sum-of-products form, nd then complementing. 25-2 McQuin
Emple 6 Given truth tble 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 vribles, tking the vrible if its vlue is nd the complement if the vrible's vlue is - tke the sum of ll such product terms; then complement the result F F = + + + F = = ( + + ) ( + + ) ( + + ) ( + + ) 25-2 McQuin
Boolen Functions 7 A Boolen function tkes n inputs from the elements of Boolen lgebr nd produces single vlue lso n element of tht Boolen lgebr. For emple, here re ll possible 2-input Boolen functions on the set {, }: A B ero nd A B or or A B nor eq B' A' nnd one 25-2 McQuin
Universlit An Boolen function cn be epressed using: - onl AND, OR nd NOT - onl AND nd NOT - onl OR nd NOT - onl AND nd XOR - onl NAND - onl NOR 8 The first ssertion should be entirel obvious. The remining ones re obvious if ou consider how to represent ech of the functions in the first set using onl the relevnt functions in the relevnt set. 25-2 McQuin