1. boolean algebra fachgebiet rechnersysteme 1 1 boolean

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

Upload: others

Post on 03-Apr-2022

14 views

Category:

Documents


0 download

TRANSCRIPT

11. Boolean Algebra

1 Boolean AlgebraFachgebiet Rechnersysteme

1. Boolean AlgebraVerification Technology

Content

1.1 Boolean algebra basics (recap)1 2 Reasoning about Boolean expressions1.2 Reasoning about Boolean expressions

21. Boolean Algebra

The problem of logic verification: Show that two circuits implement the same boolean function, or: Show that a p ,circuit correctly implements a specification

a g=1

b1

a

a&

gab

&

g&&

b&

31. Boolean Algebra1.1 Boolean algebra basics1.1 Boolean Algebra Basics1.1 Boolean Algebra Basics

AND-operation (conjunction) Gate representation

a b a b0 0 0

ab German (old)0 0 0

0 1 01 0 0

b

1 0 01 1 1 IEEE-

standardab

&

0 d ia 0-dominance b US-standard

(old)

41. Boolean Algebra1.1 Boolean algebra basics

OR-operation (disjunction) Gate representation

a b a b ab German (old)

0 0 00 1 1

b ( )

1 0 11 1 1

IEEE-standard

ab

1

1 1 1

a 1-dominance b US-standard

(old)

51. Boolean Algebra1.1 Boolean algebra basics

NOT-operation (negation, complement)Gate representationGate representation

a German (old)a a

0 1

( )

1 0IEEE-Standard

a 1

a US-standard(old)

61. Boolean Algebra1.1 Boolean algebra basics

More notations ...

a • b a b a & b

a + b a b a | ba + b a b a | b

a a a'

Propositional CalculusPropositional Calculus

71. Boolean Algebra1.1 Boolean algebra basics

More operations: (E)XOR (exclusive-or unequal addition modulo 2) (E)XOR (exclusive-or, unequal, addition modulo 2)

Definition: bababa Gate representation

baba ab German (old)

110000

baba b German (old)

011101110 =1 IEEE-

standardab

011

aab US-standard

(old)

81. Boolean Algebra1.1 Boolean algebra basics

NANDG t t tiGate representation

100b)(aba a

b German (old)

101110

IEEE-a &

011101 IEEE-

standardb

ab US-standardb (old)

91. Boolean Algebra1.1 Boolean algebra basics

NOR Gate representationGate representation

aab German (old)

100b)(aba

IEEE-a 1001010

IEEEstandardb011

001

ab US-standard

( ld)b (old)

101. Boolean Algebra1.1 Boolean algebra basics

Implikation :

Equivalence (equality):baba

Equivalence (equality):bababa

— The equivalence-function equals one iff the arguments have equal valuesTh f ti l iff th t— The exor-function equals one iff the arguments have unequal valuesGenerally: a b = (a b)— Generally: a b = (a b)

111. Boolean Algebra1.1 Boolean algebra basics

Boolean functionsTraffic-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 00 1 0 0 1 1 1 0 0 1 0 1

23 = 8 cases1 0 1 1 1 0 1 1 1

Traffic-r

1 1 1

LightChecker

eg

p

121. Boolean Algebra1.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: Bn B

Such a function models a circuit with n inputs and one output, in the example we have B3 BB3 B

Traffic-rLight

Checkereg

p

131. Boolean Algebra1.1 Boolean algebra basics

2 2 2 2x x x x

3 2 1 0

3 2 1 0 fRepresentation of Boolean functions by means offunction tables and Veitch-

0 0 0 0 00 0 0 1 10 0 1 0 0

012

x3

function tables and Veitch-(Karnaugh-) maps

0 4 812

0 0 1 0 00 0 1 1 00 1 0 0 10 1 0 1 1

2 345

0 1 01

1 5 913

0 1 0 1 10 1 1 0 00 1 1 1 11 0 0 0 0

5678

x0

1

0

1 1

0

1

11

2

3

6

7

10

11151 0 0 0 01 0 0 1 11 0 1 0 01 0 1 1 0

8 9

10x1

0

0

0 0

0

0

11

2 6 10141 0 1 1 01 1 0 0 11 1 0 1 1

111213 x2

1 1 1 0 01 1 1 1 1

1415

2

141. Boolean Algebra1.1 Boolean algebra basics

Boolean terms are textual representations of Boolean functions, e.g.,, g ,

b)+(eac+cba

The syntax of Boolean terms: The constants 0 and 1 are Boolean terms Literals (variables and complemented variables) are

Boolean terms, for instance, If a and b are Boolean terms then so are

aanda If a and b are Boolean terms then so are

ab),+(ab),(a

151. Boolean Algebra1.1 Boolean algebra basics

Product-terms (products, cubes) are conjunctions of literals Each variable occurs only once

— Example: x•y•z or xyz for shortExample: 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)

161. Boolean Algebra1.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)

171. Boolean Algebra1.1 Boolean algebra basics

The Rules of Boolean Algebra:

(T1) x + 0 = x (T1') x • 1 = x Identity(T1) x + 0 = x (T1 ) x • 1 = x 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 = 0 Complement(T5) x + x = 1 (T5') x • x = 0 Complement

181. Boolean Algebra1.1 Boolean algebra basics

(T6) x + y = y + x (T6') x • y = y • x Commutativity( ) y y ( ) y y 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 De Morgan's(T9) (x + y) x y (T9 ) (x y) x + y De Morgan s Law

(T10) ( + + ) G li d(T10) (x1 +...+ xn )= x1 •...• xn GeneralizedDe Morgan's

(T10') (x1 •...• xn )= x1 +...+ xn Law( ) ( 1 n ) 1 n

191. Boolean Algebra1.1 Boolean algebra basics

(T11) x + x•y = x + y (T11') x•(x + y) = x•y ( ) y y ( ) ( y) yAbsorption

(T12) x + x•y = x (T12') x•(x + y) = x

Very important for the simplification of terms and circuits! Example:

x

x &

1 x1

y

& y

201. Boolean Algebra1.1 Boolean algebra basics

Boole's Expansion Theorem (1849) also attributed to Shannon also attributed to Shannon

211. Boolean Algebra1.1 Boolean algebra basics

Idea: Decompose a function into two sub-0 0 0 0 0

4321 xxxx f

functions which do not depend on some variable, e g x

0 0 0 0 00 0 0 1 10 0 1 0 00 0 1 1 0 e.g., x1)x,x,xf(0, 432

0 0 1 1 00 1 0 0 10 1 0 1 10 1 1 0 00 1 1 1 11 0 0 0 0 1 0 0 0 01 0 0 1 11 0 1 0 01 0 1 1 0 )x,x,xf(1, 4321 0 1 1 01 1 0 0 11 1 0 1 11 1 1 0 01 1 1 1 1

221. Boolean Algebra1.1 Boolean algebra basics

Expansion Theorem: a Boolean Function f can be decomposed according to a variable x as followsp g

xx fxfxf

are called the Positive (1-) and Negative (0-)

xx fxfxf

ff , are called the Positive (1 ) and Negative (0 )Cofactors of f with respect to x

The cofactors can be calculated by replacing the

xx ff ,

y gvariable x by the constants 0 and 1, respectively

231. Boolean Algebra1.1 Boolean algebra basics

— Illustration in the Veitch-diagram:

b

a

1

11

1

1

1

f

fa

f

a

c

11 1 fa

fc

abbacf abbacf

241. Boolean Algebra1.1 Boolean algebra basics

— Illustration in the Veitch-diagram:

b

a

1

11

1

1

1

f

fa

a

c

11 1 fa

fc f

abbacf abbacf f a f a fa a

251. Boolean Algebra1.1 Boolean algebra basics

— Circuit realization:

b&af

a

1

11

1

1

1

f

fa 1 f

a

a

c

11 1 fa

f

&fa

c f

abbacf

a

abbacf

aa fafaf

261. Boolean Algebra1.1 Boolean algebra basics

The cofactors are calculated by replacing a by 0 and 1, respectively:respectively:

b&af

a

1

11

1

1

1

f

fa 1 f

a

a

c

11 1 fa

f

&fa

ab+ba+c=f

c fa

b,+c=1b+b1+c=fab,+ba+c=f

a

f = a (c + b ) + a (c + b )

,b+c=0b+b0+c=fa

271. Boolean Algebra1.1 Boolean algebra basics

The cofactors are calculated by replacing a by 0 and 1, respectively plus simplifications:

b&f

1cb

respectively plus simplifications:

a

1

11

1

1

1

f

fa 1 f

af

1c

b

a

c

11 1 fa

f

&fa

1cb

f = c + a b + a b ,

c fa

f c + a b + a b ,f = c + 1 b + 1 b = c + b ,a

f = a (c + b ) + a (c + b ) f = c + 0 b + 0 b = c + b ,a

281. Boolean Algebra1.1 Boolean algebra basics

The circuit used above is called a 2:1-Multiplexor

Symbol:

&

1

aa 0

&b b 1

xx

Depending on x, the output is either equal to a or equal to bto a or equal to b

291. Boolean Algebra1.1 Boolean algebra basics

Remark: the calculation of a cofactor can be viewed as a step of symbolic simulation: p y Traditional simulation determines the value at the

output of a gate-network for given values at the inputs

The calculation of a cofactor determines the function at the output if some inputs assume afunction at the output if some inputs assume a constant value (0 or 1)

1&

1

a1

1

&

1

a

f = a

&

1

b0

1

&

1

b

f = af

x0

x0

301. Boolean Algebra1.1 Boolean algebra basics

3 operations between cofactors: The Boolean Difference (Exor) The Boolean Difference (Exor) The Universal Quantification (And) Th E i t ti l Q tifi ti (O ) The Existential Quantification (Or)

311. Boolean Algebra1.1 Boolean algebra basics

The Boolean Difference

xx ffx

f(x)

XOR of both cofactors Ch t i ll it ti f hi h h f Characterizes all situations for which a change of x

implies a change of f

321. Boolean Algebra1.1 Boolean algebra basics

b— Example:

b

1 fa1 00

a 10 1 fa

a

1 00

0

c cabcbbaf

b fff(a)

cofactors are here b

1

aa ffa

10 0

c

1

cff aa

10 0

331. Boolean Algebra1.1 Boolean algebra basics

— Example: 2:1-multiplexor

&aaxbxf

&

1

a

f ffa

f(a)aa

&b

)b()b()bx()xb(

a

xx)bx()xb(

)bx()xb(

Of course! for x = 0 we have f = a,so a implies f !

341. Boolean Algebra1.1 Boolean algebra basics

The Boolean Existential Quantifer

( x : f ( x ) ) f fx x

The disjunction of both cofactors

351. Boolean Algebra1.1 Boolean algebra basics

( a : f ( a ) ) f fa a

b

a

1

1

1

1 f

fa

a

c

1 1 fa

fith f t c

b

either cofactoris 1 here

11 f fa a1

c

361. Boolean Algebra1.1 Boolean algebra basics

The calculation of the Boolean existential quantifieris particularly easy for a Boolean expression in dnf:p y y p f = ...·x + ... + ...·x + ... + ...

products products products

( x: f(x)) f fx x

products with x

products with x

products without x,x

( x: f(x)) = ...·1 + ... + ...·0 + ... + ...+...·0 + ... + ...·1 + ... + ...

= + + + +

( ( )) x xfxfx

= ... + ... + ... + ... + ...

original expression where all occurences

— Example: f = ab + bc + abc f( ) b b b ( b )

of x,x are eliminated

a: f(a) = b + bc + bc (= b + c)

371. Boolean Algebra1.1 Boolean algebra basics

The Boolean Universal Quantor

( x : f ( x ) ) f fx x

The conjunction of both cofactors

381. Boolean Algebra1.1 Boolean algebra basics

( a : f ( a ) ) f fa a

b

a

1

1

1

1 f

fa

a

c

1 1 fa

fc

bboth cofactors are 1 here

1 aa ff

c

391. Boolean Algebra1.1 Boolean algebra basics

The calculation of the Boolean universal quantifieris particularly easy for a Boolean expression in cnf:p y y p Rule: Eliminate all occurences of x,x

— Example: f = (b + c)(a + b)(a + b + c)Example: f (b c)(a b)(a b c) a: f(a) = (b + c)b(b + c) (= bc)

401. Boolean Algebra1.1 Boolean algebra basics

Inclusion A function f is included in (is covered by) function g A function f is included in (is covered by) function g,

f giff (if and only if) or equivalently f g = 1f g 0

Analogy (set theory):

0 GFGF 0 GFGF

g

gf

411. Boolean Algebra1.1 Boolean algebra basics

Example of f g using Karnaugh-maps:

1 1 1

11

1 11

1 1

f g

421. Boolean Algebra1.1 Boolean algebra basics

The following statements are equivalent:

gf

1f0gfgf

g

(f 1)fg1gf

g

f(f g = 1)

fgfggf

431. Boolean Algebra1.1 Boolean algebra basics

Assume (i) a function f in dnf and assume (ii) that g is the function f where some of the products of f are peliminated.Then g f

products not in g

Proof: f can be written in the form f = a + g. g f is equivalent to g f = 1 or g + f = 1.g + (a + g) = g + a + g = 1.g (a g) g a g 1.

We have always: a a + g.

441. Boolean Algebra1.1 Boolean algebra basics

Assume (i) a function f in cnf and assume (ii) that g is the function f where some of the clauses are eliminated.Then f g Proof: f can be written in the form f = a·g.

f g is equivalent to f g = 1 or f + g = 1.(a·g) + g = a + g + g = 1.

We have always: a·g g.y g g

451. Boolean Algebra1.1 Boolean algebra basics

Implicant of a Boolean function A product-term p is an implicant of a Boolean A product-term p is an implicant of a Boolean

function f iffp f

1

d abd is implicant of f

11

1

1

a 11ac

C t f i i li t i t l l

fb

Concept of prime-implicants in two-level logic synthesis

461. Boolean Algebra1.1 Boolean algebra basics

Tautology: A Boolean function f is called a Tautology iff f = 1 A Boolean function f is called a Tautology iff f = 1

1 1 1 11 1 1 11 1 1 11 1 1 11 1 1 11 1 1 1

— Is this a reasonable concept at all ???E l

f

— Examples:

1aa 1baba1aa

471. Boolean Algebra1.1 Boolean algebra basics

Logicverification: show that two circuits with outputs f and g implement the same boolean function! g p Show that f g is a tautology!

a f=1

b1

1

a

a&

g

ab

&

g&&

b&

f g = f*g + f*g

481. Boolean Algebra1.1 Boolean algebra basics

Boole's expansion theorem is the basis for a "Divide-and-conquer" approach to tautology checkingq pp gy g

— f = 1 iff both cofactors are equal to one

f = 1 1fxfx xx f = 1x

xx

f = 1x

2 problems in n-1pvariables

491. Boolean Algebra1.1 Boolean algebra basics

— Example: f a b a b 1 ?

f a b a b 1

f = 1 + b + 1 b = 1a

f a b a b 1 f = 0 + b + 0 b = b + b = 1a

Tautology checking may induce an exponential number of cases !exponential number of cases !

501. Boolean Algebra1.1 Boolean algebra basics

Satisfiability: a Boolean function f is satisfiable, if there is at least one combination of variable values for which f = 1 A boolean function f 0 is satisfiable! f is a tautology iff f is unsatisfiable

— Example:f a b a b 1 ?

)baba( f

is not satisfiable )ba(ba

May also need an exponential # steps

511. Boolean Algebra1.1 Boolean algebra basics

Example of application: assume a network of gates with two outputs f and g. If we want to know if both outputs p g pcan be 1 for the same combination of input values, then we can check if f·g is satisfiable.

...f

1

1g

1

521. Boolean Algebra1.1 Boolean algebra basics

If f is a tautology and if f g then g is also a tautology If f is unsatifiable and if g f then g is also unsatisfiable If f is unsatifiable and if g f then g is also unsatisfiable

531. Boolean Algebra1.1 Grundbegriffe der boolesche Algebra

German/Engl Glossary

a, a Literal literala + b + c Summenterm/Disjunktion/ sum/disjunction/

Oder-Klausel clauseabc Produktterm/Konjunktion/ product/conjunction/

Und-Klausel cubeab + bcd disjunktive Normalform (DNF) disjunctive normal form (dnf)/j ( ) j ( )

sum-of-products (sop)(a + b)(b + c)konjunktive Normalform (KNF) conjunctive normal form (cnf)/

product-of-sumsfx 0-/negativer Kofaktor 0-/negative cofactorfx 1-/positiver Kofaktor 1-/positive cofactorf = xfx + xfx Boolescher Entwicklungssatz Boole's expansion theoremf 1 T t l i t t lf = 1 Tautologie tautologyf 0 Erfüllbarkeit satisfiability

541. Boolean Algebra

1.2 Reasoning About Boolean Expressions1.2 Reasoning About Boolean Expressions

Th ifi ti f i it i l d b The verification of a circuit involves some procedures by which we give mathematical evidence that a statementabout the circuit is true A verification problem is not a circuit or a Booelan

expression A verification problem involves statements about a

circuit or a Boolean expression

A Boolean expression is 0 or 1, a statement is true or falsetrue or false

"mathematical evidence" means that we are able to give something like a mathematical g gproof of the truth of some statement

551. Boolean Algebra1.2 Reasoning about Boolean expressions

Typical statements involved in verification problems are: "The outputs of two circuits are equal" "The outputs of two circuits are equal" "It is not possible that the outputs x and y of a circuit

both assume the value 1"both assume the value 1 Implications: "If the inputs are ... then the outputs are

..." or: "If the outputs are ... then the inputs must be ..." p p ... and many other types of statements involving, for

instance, temporal qualifiers like "in the next clock-l " " " " l " " i "cycle", "never", "always", "sometimes", etc.

561. Boolean Algebra1.2 Reasoning about Boolean expressions

Boolean expressions assume the Boolean values 0 or 1 Statements (about a circuit) are either true or false i e Statements (about a circuit) are either true or false, i.e.,

they hold or do not hold (for a circuit) "it rains" "the colour of my car is red" "a+b=b+a" it rains , the colour of my car is red , a+b=b+a , …

A proof of a statement establishes the truth of the statement

A proof-procedure is a method by which we can mechanically derive the truth of statements

We are interested in the development of proof-procedures to verify statements about circuits

571. Boolean Algebra1.2 Reasoning about Boolean expressions

We employ common mathematical notations using symbols like "=", etc. to make statementssymbols like , etc. to make statements

— Example: "The outputs of two circuits are equal for all possible input combinations", formally: f = g (as in sin2(x) + cos2(x) = 1)

We also used mathematical notations to introduce some b i t lik "" i th f tibasic concepts like "" in the former section

The following paragraphs attempt to be a little bit more precise about symbols like "=" in order avoid confusionprecise about symbols like = in order avoid confusion with the symbols of Boolean algebra

= and (or and ) are so similar, what is ( ) ,the difference?

In fact, there IS a very close relationship between propositional logic and Boolean algebra

581. Boolean Algebra1.2 Reasoning about Boolean expressions

We employ two different types of notation with different symbols:symbols: The language of Boolean expressions (or Boolean terms)

with the Boolean operators ·, +, , , etc. — Boolean expressions assume the values 0 or 1.

A (mathematical) meta-language to make statements ( ) g gabout Boolean expressions using symbols like =, , , etc. which are well-known from other mathematical disciplinesdisciplines.

— Statements are true or false.Examples: a+b = b+a a·g g etc— Examples: a+b = b+a, a·g g, etc.

591. Boolean Algebra1.2 Reasoning about Boolean expressions

Again: A Boolean expression may assume the values 0 or 1 A Boolean expression may assume the values 0 or 1. A statement may be true of false.

The meta language for statements has two different types of The meta-language for statements has two different types of symbols: Predicate-symbols like = and . Applying a predicate toPredicate symbols like and . Applying a predicate to

expressions results in a statement which is true or false. — Example: x x+1

expression expression

t t t

While functions and expressions return a value,

statement

p ,predicates may be viewed as special functions returning the values true or false

601. Boolean Algebra1.2 Reasoning about Boolean expressions

Logical (propositional) connectives like , , ¬, and .Logical connectives combine statements to statements.g

— Example: x x+1 x = x+1

statement statementstatement statementstatement

xy yz xz

st.st.st. st.st.st.

statement

611. Boolean Algebra1.2 Reasoning about Boolean expressions

The resulting truth-values of the logical connectives are defined analogously to the Boolean operators and aredefined analogously to the Boolean operators and are typically given by truth-tables.

— Example: The truth-table of the propositional and "". p p pLet A and B be two statements. Then the truth of A B is defined as follows:

A false truef l f l f l

B

false false falsetrue false true

A B

We try to avoid an "over-formalization" of

A B

verification problems and will use logical connectives only rarely.

621. Boolean Algebra1.2 Reasoning about Boolean expressions

Due to the close relationship between the Boolean operators and the operators of our mathematical meta-language, weand the operators of our mathematical meta language, we can often transform a verification problem (phrased as a statement) into a different (often more managable) form. Example: Rather than to prove f = g we show that

fg = 1, i.e., that fg is a tautology.

631. Boolean Algebra1.2 Reasoning about Boolean expressions

Generally, we transform statements F and G involving Boolean expressions into equivalent Boolean expressions p q pBe(F) and Be(G) as follows (f,g Boolean expressions):Statement Boolean expression

f = 1 ff = 1 ff = 0 ff = g f g f g f gF G Be(F) Be(g) etc. ¬F Be(F)F Be(F)

F G Be(F) Be(G) The proof of a statement is equivalent to showing the p q g

tautology of the transformed Boolean expression, e.g., to prove f = g we show that f g = 1

641. Boolean Algebra1.2 Reasoning about Boolean expressions

— Example: The statement "If x is 1 then y is 1 in the p yfollowing circuit" is formalized as the statement

x = 1 y = 1The equivalent Boolean expression isThe equivalent Boolean expression is

x yThe proof of the original statement is transformed into the proof of the tautology of x y, i.e., we have to prove the statement x y = 1

a x&b

y

&One possible proof:x y = x+y =ab + a+b= a + b + a + b = 1 (q.e.d.)y

1

651. Boolean Algebra1.2 Reasoning about Boolean expressions

A note on implications: In many situation we have to prove the truth of an if then In many situation, we have to prove the truth of an if-then

statement in natural language: "if A then C" where the commitment C follows from another statement, the assumption A.

Formally, this is denoted as an implication A C. The definition of the logical implication A C in terms of a

truth-table: C A C = ¬A CA false truefalse true truet f l t

A C = ¬A Ca c = a + c

If we want to prove A C then we see from the truth table

true false trueA C

If we want to prove A C then we see from the truth-table that for the case where A is false we do not have to prove anything - A C is true independently of C.

661. Boolean Algebra1.2 Reasoning about Boolean expressions

All what we have to do is to prove that C is true for the case that A is true.that A is true.

We see this also if we transform the implication into the equivalent Boolean expression. Assume again the statement: x = 1 y = 1 and the equivalent Boolean expression x y. If we want to show the tautology, i.e., x y = 1 and create the function table of x y:function table of x y:

x 0 1y

ab

x&x 0 10 1 11 0 1

b

y1

then we have to show only that y=1 follows from x=1.

1

For the circuit, our argument would be: If x=1 then a=1 and b=1 since x=ab. Thus, y=1 since y=a+b. (q.e.d.)

671. Boolean Algebra1.2 Reasoning about Boolean expressions

There are many different ways ("decision procedures") to establish the truth of statements, the transformation into ,an equivalent Boolean expression is only one possibility.

A very common technique is to create a circuit for the l i l t t f th t t t d bi thi i itlogical structure of the statement and combine this circuit with the original circuit.

Since we are able to transform statementsSince we are able to transform statements into Boolean expressions we can also transform statements into circuits!

— Example: The implication circuit for x y

y1x

y

Implication circuit

681. Boolean Algebra1.2 Reasoning about Boolean expressions

— Statement and original circuit in combination:

ab

x& For a tautology, the output must always

y1

output must always be 1

1

Implication pcircuit

691. Boolean Algebra1.2 Reasoning about Boolean expressions

— Example we discussed before: Prove f = g

Equality circuit

a f=1

b1

a

a&

gab

&

g&&

For a tautology, the output must always

b& output must always

be 1