Saturday, May 10, 2008

Assignment #2

1. For this question, I transposed the original table so I could put the combinations in line with the output. The top two rows are the inputs, the first column is the output number (0 - 15)

X .0 0 1 1
Y .0 1 0 1
0. 0 0 0 0 Y AND NOT Y
1 .0 0 0 1 X AND Y
2 .0 0 1 0 NOT(NOT ((X OR Y) AND (NOT (X AND Y)) OR (NOT X))
3 .0 0 1 1 X
4 .0 1 0 0 Y AND (NOT X)
5 .0 1 0 1 Y
6 .0 1 1 0 ((X OR Y) AND (NOT (X AND Y)) AND (NOT X)
7 .0 1 1 1 X OR Y
8 .1 0 0 0 NOT(X OR Y)
9 .1 0 0 1 NOT ((X OR Y) AND (NOT (X AND Y))
10. 1 0 1 0 NOT Y
11 .1 0 1 1 NOT ((X OR Y) AND (NOT (X AND Y)) OR (NOT Y)
12 .1 1 0 0 NOT X
13 .1 1 0 1 NOT ((X OR Y) AND (NOT (X AND Y))) OR (NOT X)
14 .1 1 1 0 NOT(X AND Y)
15 .1 1 1 1 X AND (NOT X)

2. Correction: According to DeMorgan's Law, all 16 outputs can be descibed using combinations of AND and NOT. (as was demonstrated in class Monday)

3. The binary function #0 is associative since f(x,y) , f(f(x,y)z), f(y,z) and f(x,f(y.z)) all return o,o,o,o.

4. There are nine binary arguments if you start with {0,1,2} as possible inputs. (3*3). Based on the two input - one output scheme in the first question (2 inputs = 2^n arguments and 2^n^2 outputs) it seems logical that there should be 3^n^2 outputs for for trinary inputs; 3^3^2 = 19683.

5. (Just read "Alice's" blog...the link provided the answer to this one.) The binary operations NOT, OR, AND, and IMPL are required to express every possible two argument function on trinary operations.

6.








Left -Pic1 AND Pic2
Centre Pic1 OR Pic2
Right NOT(Pic1 IMPL Pic2)

7. Death by poison P
Change in blood chemistry C
Residue R
Puncture marks M
Needle N

P IFF (C XOR R)
(NOT (C XOR R) AND M
M AND N
P XOR (NOT M)

Orders of Magnitude

1. A GB is 2^30 bytes. 64 kB is 2^14 bytes. Dividing gives an answer of 16 384, so the 1 GB memory of today is 16 384 times bigger than the Commodore 64.

2. 4.7 GB is 4.7 * 2^30. 800 K is 800 * 2^10. Dividing gives 6160.384 so you would need approximately 6161 floppy discs to store 1 DVD worth of data.

3. In 1976, the Apple 1 had a speed of 1 MHz (1 * 2^20) (http://www.old-computers.com/museum/computer.asp?c=67&st=1)
The TRS 80 I got in 1982 had a speed of 4 MHz (4 * 2^20) (http://www.old-computers.com/museum/computer.asp?c=242&st=1)

The MacAir (just out) has a speed of 1.8 GHz (1.8 * 2^30) (http://www.apple.com/ca/macbookair/guidedtour/)
The MacPro runs at 3.2 GHz (3.2 * 2^30)

The MacPro is 3276.8 times faster than the Apple 1 and 819 times faster than the TRS 80.

No comments: