15.08.2013 Views

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

y the variable assignments). The notion of equivalent formulae formalizes this intuition.<br />

Boolean Equivalences<br />

Given a, b, c ∈ Ebool, ◦ ∈ {+, ∗}, let ˆ◦ :=<br />

+ if ◦ = ∗<br />

∗ else<br />

We have the following equivalences in Boolean Algebra:<br />

a ◦ b ≡ b ◦ a (commutativity)<br />

(a ◦ b) ◦ c ≡ a ◦ (b ◦ c) (associativity)<br />

a ◦ (bˆ◦c) ≡ (a ◦ b)ˆ◦(a ◦ c) (distributivity)<br />

a ◦ (aˆ◦b) ≡ a (covering)<br />

(a ◦ b)ˆ◦(a ◦ b) ≡ a (combining)<br />

(a ◦ b)ˆ◦((a ◦ c)ˆ◦(b ◦ c)) ≡ (a ◦ b)ˆ◦(a ◦ c) (consensus)<br />

a ◦ b ≡ aˆ◦b (De Morgan)<br />

2.5.2 Boolean Functions<br />

c○: Michael Kohlhase 139<br />

We will now turn to “semantical” counterparts of Boolean expressions: Boolean functions. These<br />

are just n-ary functions on the Boolean values.<br />

Boolean functions are interesting, since can be used as computational devices; we will study<br />

this extensively in the rest of the course. In particular, we can consider a computer CPU as<br />

collection of Boolean functions (e.g. a modern CPU with 64 inputs and outputs can be viewed as<br />

a sequence of 64 Boolean functions of arity 64: one function per output pin).<br />

The theory we will develop now will help us understand how to “implement” Boolean functions<br />

(as specifications of computer chips), viewing Boolean expressions very abstract representations of<br />

configurations of logic gates and wiring. We will study the issues of representing such configurations<br />

in more detail later 7 EdNote:7<br />

Boolean Functions<br />

Definition 246 A Boolean function is a function from B n to B.<br />

Definition 247 Boolean functions f, g : B n → B are called equivalent, (write f ≡ g), iff<br />

f(c) = g(c) for all c ∈ B n . (equal as functions)<br />

Idea: We can turn any Boolean expression into a Boolean function by ordering the variables<br />

(use the lexical ordering on {X} × {1, . . . , 9} + × {0, . . . , 9} ∗ )<br />

Definition 248 Let e ∈ Ebool and {x1, . . . , xn} the set of variables in e, then call V L(e) :=<br />

〈x1, . . . , xn〉 the variable list of e, iff (xi

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!