DOC PREVIEW
Princeton COS 116 - Lecture

This preview shows page 1-2-22-23 out of 23 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Slide 1MidtermPart 1: Self-ReproductionSlide 4Slide 5Slide 6High-level view of self-reproducing programSelf-reproducing machinesSlide 9Moving on to part 2… Upcoming lectures: Computational HardwareSlide 11Propositional Logic: HistoryExampleEd goes to the party if Dan goes or Stella goesBoolean expressionsTruth tableLet’s work an example…Ben RevisitedBoolean “algebra”Boolean circuitThree Equivalent RepresentationsEd goes to the party if Dan doesn’t AND Stella doesn’tSlide 23Self-reproducing programs. And Introduction to logic.COS 116, Spring 2012Adam FinkelsteinMidtermOne week from today – in class Mar 15Covers  lectures, labs, homework, readings to dateOld midterms will be posted on course webMar 12 and 14 lab times will be review feel free to attend either or both come with questionsPart 1: Self-ReproductionFallacious argument for impossibility:BlueprintBlueprintBlueprint“Droste Effect”Fallacy Resolved: “Blueprint” can involve computation; need not be an exact copy! Print the following sentence twice, the second time in quotes. “Print the following sentence twice, the second time in quotes.”High-level view of self-reproducing programPrint 0Print 1...Print 0. . . . . . . . . . . .. . . . . .. . . . . .}Prints binary code of B}Takes binary string on tape, and in its place prints (in English) the sequence of statements that produce it, followed by the translation of the binary string into English.ABSelf-reproducing machines[John von Neumann, 1940s]2-D and 3-D cellular automata(with a “moving arm” controlledby the automaton itself) that makes a precise copy of itself.“Accidental changes” duringcopying --> mutations, evolutionThis and related ideas of Pauli motivated discoveryof the molecular basis of life on earth (DNA, RNA etc.)Moving on to part 2… Upcoming lectures: Computational HardwareBoolean logic and Boolean circuitsSequential circuits (circuits with memory)Clocked circuits and Finite State MachinesCPUsOperating SystemNetworks, InternetBen only rides to class if he overslept, but even then if it is raining he’ll walk and show up late (he hates to bike in the rain). But if there’s an exam that day,he’ll bike if he overslept, even in the rain. Q: It is raining today, Ben overslept, and there’s an exam. Will Ben bike today?“Logical reasoning”, “Propositional logic.”Discussion TimePropositional Logic: HistoryAristotle – Law of excluded middle, Law of contradiction.Stoic Philosophers (3rd century BC) – Basic inference rules (modus ponens etc.)Some work by medieval philosophersDe Morgan and Boole (19th century): Symbolic logic – “automated”, “mechanical”C. Shannon (1930s) – Proposal to use digital hardwareExampleEd goes to the party if Dan does not and Stella does.Choose “Boolean variables” for 3 events:E: Ed goes to partyD: Dan goes to partyS: Stella goes to party}{Each is either TRUE or FALSEE = S AND (NOT D)Alternately: E = S AND DEd goes to the party if Dan goes or Stella goesE = D OR S E is TRUE if one or both of D and S are TRUENote: In everyday language OR has another meaning too!Example: You can eat an orange or an appleLogical “OR”Boolean expressionsComposed of boolean variables, AND, OR, and NOTExamples:D AND ( P OR (NOT Q))C OR D OR ETruth tableLists the truth value of the Boolean expression for all combinations of values for the variables.Boolean Expression E = S AND D001011110000ESDTruth table 0 = FALSE 1 = TRUE Write E for all possible values of D, S.Let’s work an example…Boolean Expression E = D OR SWhat are x and y ?!?y01111x10100ESDPossibilities:x=0, y=0x=0, y=1x=1, y=0X=1, y=1Ben RevisitedB: Ben BikesR: It is rainingE: There is an exam todayO: Ben oversleptBreak up in groups of three and come up with Boolean expression for B in terms of R, E and O. Ben only rides to class if he overslept. But even then if it is raining he’ll walk and show up late (he hates to bike in the rain). But if there’s an exam that day he’ll bike if he overslept, even in the rain.Boolean “algebra”A AND B written as A  B A OR B written as A + B0 + 0 = 01 + 0 = 11 + 1 = 10  0 = 00  1 = 01  1 = 1Funny arithmeticBoolean circuitPictorial representation of Boolean expression using Special symbols for AND, OR and NOTA AND BA OR BAThree Equivalent RepresentationsBoolean Expression E = S AND DTruth table:Value of E for every possible D, S. TRUE=1; FALSE= 0.001011110000ESDBoolean CircuitESDEd goes to the party if Dan doesn’t AND Stella doesn’tE = D AND SIs this equivalent to:Ed goes to the party ifNOT (Dan goes OR Stella goes)….?(De Morgan’s Laws)Next time: Boolean circuits, the basic components of the digital worldMidterm will have a question on boolean


View Full Document

Princeton COS 116 - Lecture

Documents in this Course
Lecture 5

Lecture 5

15 pages

lecture 7

lecture 7

22 pages

Lecture

Lecture

32 pages

Lecture

Lecture

16 pages

Midterm

Midterm

2 pages

Lecture

Lecture

21 pages

Lecture

Lecture

24 pages

Lecture

Lecture

22 pages

Lecture

Lecture

28 pages

Lecture

Lecture

21 pages

Lecture

Lecture

50 pages

Lecture

Lecture

19 pages

Lecture

Lecture

28 pages

Lecture

Lecture

32 pages

Lecture

Lecture

23 pages

Lecture

Lecture

21 pages

Lecture

Lecture

19 pages

Lecture

Lecture

22 pages

Lecture

Lecture

21 pages

Logic

Logic

20 pages

Lab 7

Lab 7

9 pages

Lecture

Lecture

25 pages

Lecture 2

Lecture 2

25 pages

lecture 8

lecture 8

19 pages

Midterm

Midterm

5 pages

Lecture

Lecture

26 pages

Lecture

Lecture

29 pages

Lecture

Lecture

40 pages

Lecture 3

Lecture 3

37 pages

lecture 3

lecture 3

23 pages

lecture 3

lecture 3

20 pages

Lecture

Lecture

21 pages

Lecture

Lecture

24 pages

Lecture

Lecture

19 pages

Load more
Download Lecture
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?