1 boolean algebra 1 boolean algebra
play

1 Boolean Algebra 1. Boolean Algebra Verification Technology - PowerPoint PPT Presentation

Fachgebiet Rechnersysteme 1. Boolean Algebra 1 1 Boolean Algebra 1. Boolean Algebra Verification Technology Content 1.1 Boolean algebra basics (recap) 1 2 Reasoning about Boolean expressions 1.2 Reasoning about Boolean expressions 1.


  1. Fachgebiet Rechnersysteme 1. Boolean Algebra 1 1 Boolean Algebra 1. Boolean Algebra Verification Technology Content 1.1 Boolean algebra basics (recap) 1 2 Reasoning about Boolean expressions 1.2 Reasoning about Boolean expressions

  2. 1. Boolean Algebra 2  The problem of logic verification: Show that two circuits implement the same boolean function, or: Show that a p , circuit correctly implements a specification g a =1 1 b a & g g a a & & b & & b

  3. 1. Boolean Algebra 3 1.1 Boolean algebra basics 1.1 Boolean Algebra Basics 1.1 Boolean Algebra Basics  AND-operation (conjunction) Gate representation  a b a b a German (old) 0 0 0 0 0 0 b b 0 1 0 1 0 1 0 0 0 a & IEEE- 1 1 1 b standard a  0 d  0-dominance i US-standard b (old)

  4. 1. Boolean Algebra 4 1.1 Boolean algebra basics  Gate representation OR-operation (disjunction) a  a b a b German (old) ( ) b b 0 0 0 0 1 1  1 a IEEE- 1 0 1 b standard 1 1 1 1 1 1 a   1-dominance US-standard b (old)

  5. 1. Boolean Algebra 5 1.1 Boolean algebra basics  NOT-operation (negation, complement) Gate representation Gate representation a German (old) ( ) a a 0 1 IEEE- 1 a 1 0 Standard a US-standard (old)

  6. 1. Boolean Algebra 6 1.1 Boolean algebra basics  More notations ... a  b a • b a & b a  b a  b a + b a + b a | b a | b  a a a' Propositional Calculus Propositional Calculus

  7. 1. Boolean Algebra 7 1.1 Boolean algebra basics  More operations:  (E)XOR  (exclusive-or unequal addition modulo 2)  (E)XOR  (exclusive-or, unequal, addition modulo 2) Gate representation      Definition: a b a b a b a    a a b b a a b b German (old) German (old) b b 0 0 0 0 0 1 1 1 1 a =1 IEEE- 1 0 1 standard b 1 1 1 1 0 0 a US-standard b (old)

  8. 1. Boolean Algebra 8 1.1 Boolean algebra basics  NAND G t Gate representation t ti a  a b (a b) German (old) b 0 0 1 0 1 1 a & 1 1 0 0 1 1 IEEE- IEEE- b standard 1 1 0 a US-standard b b (old)

  9. 1. Boolean Algebra 9 1.1 Boolean algebra basics  NOR Gate representation Gate representation a  a b (a b) German (old) b 0 0 1 0 1 0  1 a 1 1 0 0 0 0 IEEE- IEEE standard b 1 1 0 a US-standard b b ( ld) (old)

  10. 1. Boolean Algebra 10 1.1 Boolean algebra basics  Implikation  :    a b a b  Equivalence  (equality):  Equivalence  (equality):      a b a b a b — The equivalence-function equals one iff the arguments have equal values — The exor-function equals one iff the arguments Th f ti l iff th t have unequal values — Generally: a  b = (a  b) Generally: a  b = (a  b)

  11. 1. Boolean Algebra 11 1.1 Boolean algebra basics  Boolean functions — Traffic-light checker: inputs: r red, g green, e Traffic-light checker: inputs: r red g green e yellow r e g p? 0 0 0 0 0 1 0 1 0 0 1 0 0 1 1 2 3 = 8 cases 1 0 0 1 0 1 1 0 1 1 1 0 1 1 1 1 1 1 r Traffic- e p Light Checker g

  12. 1. Boolean Algebra 12 1.1 Boolean algebra basics  r, e, g are Boolean variables   B = {0 1} is the set of Boolean values B = {0, 1} is the set of Boolean values  A Boolean function in n variables is a mapping F: B n  B  Such a function models a circuit with n inputs and one output, in the example we have B 3  B B 3 B r Traffic- e p Light Checker g

  13. 1. Boolean Algebra 13 1.1 Boolean algebra basics 3 2 1 0 2 2 2 2 Representation of Boolean functions by means of x x x x 0 f 3 2 1 function tables and Veitch- function tables and Veitch- 0 0 0 0 0 0 (Karnaugh-) maps 0 0 0 1 1 1 x 3 0 0 1 0 0 0 1 0 0 0 2 2 0 0 1 1 0 3 0 1 1 0 0 1 0 0 1 4 12 4 8 0 0 1 0 1 0 1 0 1 1 1 5 5 1 1 1 0 1 1 0 0 1 6 1 5 13 9 x 0 0 1 1 1 1 7 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 1 8 8 15 7 3 11 1 0 0 1 1 9 x 1 1 0 1 0 0 0 10 0 0 0 1 0 1 1 0 1 0 1 1 0 2 2 6 6 10 10 14 11 1 1 0 0 1 12 x 2 1 1 0 1 1 13 2 1 1 1 0 0 14 1 1 1 1 1 15

  14. 1. Boolean Algebra 14 1.1 Boolean algebra basics  Boolean terms are textual representations of Boolean functions, e.g., , g ,     a b c + c a (e + b)  The syntax of Boolean terms:  The constants 0 and 1 are Boolean terms  Literals (variables and complemented variables) are Boolean terms, for instance, a and a  If a and b are Boolean terms then so are  If a and b are Boolean terms then so are (a  b), (a + b), a

  15. 1. Boolean Algebra 15 1.1 Boolean algebra basics  Product-terms (products, cubes) are conjunctions of literals  Each variable occurs only once — Example: x•y•z or xyz for short Example: x y z or xyz for short  Special case: Minterm (product-term in all variables)   Sum-terms (clauses) are disjunctions of literals Sum terms (clauses) are disjunctions of literals  Special case: Maxterm (sum-term in all variables)

  16. 1. Boolean Algebra 16 1.1 Boolean algebra basics  A Sum-of-Products (sop) (also called a disjunctive normal form, dnf) is a disjunction of products , ) j p — Example: cyz + d + ax  A Product-of-Sums (pos) (also called a conjunctive normal form, cnf) is a conjunction of sums — Example: (c + x + b)(s + x)(a + x)

  17. 1. Boolean Algebra 17 1.1 Boolean algebra basics  The Rules of Boolean Algebra: (T1) x + 0 = x (T1) x + 0 = x (T1') x • 1 = x (T1 ) x • 1 = x Identity Identity (T2) x + 1 = 1 (T2') x • 0 = 0 0/1-Element (T3) x + x = x (T3') x • x = x Idempotence (T4) x = x (T4') 1 = 0 Involution (T5) x + x = 1 (T5) x + x = 1 (T5') x • x = 0 (T5') x • x = 0 Complement Complement

  18. 1. Boolean Algebra 18 1.1 Boolean algebra basics (T6) x + y = y + x ( ) y y (T6') x • y = y • x ( ) y y Commutativity y (T7) (x + y) + z = x + (y + z) = x + y + z Associativity (T7') (x • y) • z = x • (y • z) = x • y • z (T7 ) (x • y) • z = x • (y • z) = x • y • z (T8) x•y + x•z = x•(y + z) Distributivity (T8') (x + y)•(x + z) = x + y•z (T9) (x + y) x y (T9) (x + y) = x • y (T9 ) (x y) x + y (T9') (x • y) = x + y De Morgan's De Morgan s Law (T10) (x 1 +...+ x n )= x 1 •...• x n (T10) ( + + ) G Generalized li d De Morgan's (T10') (x 1 •...• x n )= x 1 +...+ x n ( ) ( n ) Law 1 1 n

  19. 1. Boolean Algebra 19 1.1 Boolean algebra basics (T11) x + x•y = x + y ( ) y y (T11') x•(x + y) = x•y ( ) ( y) y Absorption (T12) x + x•y = x (T12') x•(x + y) = x  Very important for the simplification of terms and circuits! Example: x  1 x  1 x & & y y

  20. 1. Boolean Algebra 20 1.1 Boolean algebra basics  Boole's Expansion Theorem (1849)  also attributed to Shannon  also attributed to Shannon

  21. 1. Boolean Algebra 21 1.1 Boolean algebra basics x x x x f 1 2 3 4  Idea: Decompose a function into two sub- 0 0 0 0 0 0 0 0 0 0 functions which do not 0 0 0 1 1 depend on some variable, 0 0 1 0 0 e g e.g., x 1 x 0 0 1 1 0 0 1 1 0 0 f(0, x , x , x ) 0 1 0 0 1 2 3 4 0 1 0 1 1 0 1 1 0 0 0 1 1 1 1  1 0 0 0 1 0 0 0 0 0 1 0 0 1 1 1 0 1 0 0 1 0 1 1 1 0 1 1 0 0 f(1, x , x , x ) 1 1 0 0 1 2 3 4 1 1 0 1 1 1 1 1 0 0 1 1 1 1 1

  22. 1. Boolean Algebra 22 1.1 Boolean algebra basics  Expansion Theorem: a Boolean Function f can be decomposed according to a variable x as follows p g      f f x x f f x x f f x x x x   f , f , f f are called the Positive (1-) and Negative (0-) are called the Positive (1 ) and Negative (0 ) x x Cofactors of f with respect to x  The cofactors can be calculated by replacing the y g variable x by the constants 0 and 1, respectively

  23. 1. Boolean Algebra 23 1.1 Boolean algebra basics — Illustration in the Veitch-diagram: b f a 1 1 1 f a f 1 1 1 1 1 1 a a f f c c      f f c c a a b b ab ab

  24. 1. Boolean Algebra 24 1.1 Boolean algebra basics — Illustration in the Veitch-diagram: b f a 1 1 1  f a f 1 1 1 1 1 1 a a f f c c      f f c c a a b b ab ab     f a f a f a a

  25. 1. Boolean Algebra 25 1.1 Boolean algebra basics — Circuit realization: b f & a a f a 1 1 1  1 f  f a f 1 1 1 1 1 1 a a & f a f f c c a      f f c c a a b b ab ab     f a f a f a a

  26. 1. Boolean Algebra 26 1.1 Boolean algebra basics  The cofactors are calculated by replacing a by 0 and 1, respectively: respectively: b f & a a f a 1 1 1  1 f  f f a 1 1 1 1 1 1 a a & f a f f c c a f f = = c c + + a a b b + + ab ab, f = c + 1 b + 1b = c + b, a f a = c + 0 b + 0b = c + b ,   f = a (c + b ) + a (c + b )

Recommend


More recommend