12.08.2013 Views

calculus book - Mathematics and Computer Science

calculus book - Mathematics and Computer Science

calculus book - Mathematics and Computer Science

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

1.1. THE NATURE OF MATHEMATICS 3<br />

Next, consider the following arithmetic/logical operations that are<br />

built from representations of bits:<br />

• (Binary arithmetic) Think of 0 as representing an arbitrary even<br />

integer, <strong>and</strong> 1 as representing an arbitrary odd integer. That is,<br />

an integer is identified with its remainder on division by 2. The<br />

sum of two odd integers is always even (“1 + 1 = 0”), the product<br />

of an even <strong>and</strong> an odd integer is always even (“0 · 1 = 0”), <strong>and</strong> so<br />

forth. If we tabulate the results of addition <strong>and</strong> multiplication,<br />

we get<br />

+ 0 1<br />

0 0 1<br />

1 1 0<br />

· 0 1<br />

0 0 0<br />

1 0 1<br />

• (Boolean logic) Think of F as representing an arbitrary “false”<br />

assertion (such as “2 + 2 = 5”) <strong>and</strong> T as representing an arbitrary<br />

“true” sentence (such as “1+1 = 2”). Since “2+2 = 5 or 1+1 = 2,<br />

but not both” is true, we write “F xor T=T”. (“xor” st<strong>and</strong>s for<br />

“exclusive or”: one statement is true, but not both.) Since “2+2 =<br />

5 <strong>and</strong> 1 + 1 = 2” is false, we write “F <strong>and</strong> T=F”. The tables below<br />

give the “truth value” of a statement made by conjoining two<br />

statements, according to whether or not each statement is true or<br />

false.<br />

xor F T<br />

F F T<br />

T T F<br />

<strong>and</strong> F T<br />

F F F<br />

T F T<br />

Each pair of tables encapsulates some structure about bits of data.<br />

The truly mathematical observation is that the entries of the tables<br />

correspond: under the correspondence even-False <strong>and</strong> odd-True, “addition<br />

(mod 2)” corresponds to “xor”, <strong>and</strong> “multiplication (mod 2)” corresponds<br />

to “<strong>and</strong>”. The two pairs of tables above are different implementations<br />

of the same abstract structure, which might even be denoted<br />

∨ • ◦<br />

• • ◦<br />

◦ ◦ •<br />

∧ • ◦<br />

• • •<br />

◦ • ◦

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

Saved successfully!

Ooh no, something went wrong!