Friday, May 9, 2008

Logic & Machines

Now..with corrections, which is quite contradictory to my theory of internet copying. We should be assessed on our original ideas, yet pressure to earn high grades persists...and so it is a competition to see who can log in most often to edit solutions and read other's solutions...I trust my professor's objectives, however, and am not concerned.

Note: ^ = AND
~ = NOT
...unfourtunately, I don't have a symbol for OR, so OR = OR.

2064 = 0(mod8), 2064=0(mod3), 2064=6(mod7)

(1) The 16 output functions, in order and hopefully with no careless errors, are:
1. (X ^ ~X) ^ (Y ^ ~Y)
2. X^Y
3. X ^ ~Y
4. X = (X^Y) OR (X ^ ~Y)
5. Y ^ ~X
6. Y = (Y^X) OR (Y ^ ~X)
7. (X ^ ~Y) OR (Y ^ ~X)
8. X OR Y
9. ~X ^ ~Y
10. (X^Y) OR (~X ^ ~Y)
11. ~Y = (X ^ ~Y) OR (~X ^ ~Y)
12. X OR ~Y
13. ~X = (Y ^ ~X) OR (~Y ^ ~X)
14. ~X OR Y
15. ~(X^Y)
16. (X^Y) OR ~(X^Y)

(2)a) All functions can be represented using {AND, NOT} because of De'Morgan's law...one day, when I have more time, I will show the originally suggested functions in terms of {AND, NOT}.

The following functions cannot be represented using only {AND, NOT}:
4. X
6. Y
7. XOR
8. OR
10. XAND
11. NOT Y
12. Y IMPL X
13. NOT X
14. NAND
16. 1

(3)a) The following functions are not commutative (and hence the other ones are commutative):
3. X ^ ~Y does not equal Y ^ ~X
4. X does not equal Y
5. Y ^ ~X does not equal X ^ ~Y
6. Y does not equal X
11. ~Y does not equal ~X
12. Y IMPL X does not equal X IMPL Y
13. ~X does not eqaul ~Y
14. X IMPL Y does not equal Y IMPL X

(4) There are 2^9 = 512 possible output functions when there are three possible inputs.

512 can also be found by the summation:
9C0 + 9C1 + 9C2 + 9C3 + 9C4 + 9C5 + 9C6 + 9C7 + 9C8 + 9C9 = 512

I discovered this method by examining the binary case:
6 ways to choose two 1s, 4 ways to choose one 1, 4 ways to choose three 1s, 1 way to choose no 1s, and 1 way to choose four 1s (or 0s in each case).

btw: I did think of 3^9 = 19683 possible output functions since in binary it is 2^4 = 16, but didn't like the logic behind that solution, so I discarded it.

(5) Three binary operations (AND, OR, and NOT), along with operations to ACCEPT AND/OR REJECT 0's, 1's, and 2's, are necessary to express every possible output function in trinary. XOR, IMPL, etc., are just compositions of these.
For example, XOR = (X ^ ~Y) OR (Y ^ ~X) in trinary as in binary. Where X:= ACCEPT 1 only. I am picturing trinary operating more as a Turing machine.
input output
00 0
01 1
02 0
10 1
11 0
12 1
20 0
21 1
22 0

(6)pic1 AND pic2





pic1 OR pic2



g) 0 = white, 1 = black

x/ y/ x-->y /x ^ (x-->y)
0/0/1/0
0/1/1/0
1/0/0/0
1/1/1/1

x ^ (x-->y) = x ^ y







(7)
P - poison
D - death
C - change in blood chemistry
R - residue of poison in stomach
B - puncture marks on the body
N - injection by needle

(P IMPL D) AND (C OR R). NOT C AND NOT R AND B. N IMPL B. (P IMPL D) OR NOT B.

Orders of Magnitude

(1) 63K = 2^6 x 2^10 bytes = 2^16 bytes; 1GB = 2^10 MB = 2^30 bytes. Today's computer has 2^14 bytes more memory.

(2) Floppy disk - 800 x 2^10 bytes = 100 x 2^13 bytes. DVD - 4.7 x 2^30 bytes. Dividing the DVD memory by the floppy disk memory...1 DVD = approximately 6160 Floppy disks.

(3) early 1990s: Apple - 110MHz, Intel - 100MHz (http://en.wikipedia.org/wiki/Clock_rate). Today, computer can run at 500GHz, Intel just sells a 3.40 GHz Processor (http://processorfinder.intel.com/details.aspx?sSpec=SL7PP).

3.4 x 2^10 MHz v.s. 110 MHz. Today's computer is about 35x faster?

See the link below to more acurately compare speed factors, contains some complicated details about clock rate, bits/clock, and multiplier, to get computer "speed". http://www.yale.edu/pclt/PCHW/clockidea.htm

1 comment:

Mike Zabrocki said...

I'm glad you have faith in my objectives. At least someone besides me does because they are pure and good and innocent. I want you to see each others answers and revise your own. Is this cheating? Did you learn something?