DOC PREVIEW
Princeton COS 116 - Logic

This preview shows page 1-2-19-20 out of 20 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 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 20 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 20 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 20 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Logic: From Greeks to philosophers to circuits.COS 1163/14/2005Instructor: Sanjeev AroraIn addition to course handouts, many web-based resources; e.g., http://www.allaboutcircuits.com/vol_4/chpt_7/1.html3 equivalent ways of representationBoolean Expression E = S AND D = S· DTruth table – Gives value of E for every possible assignment to D, S.TRUE=1; FALSE= 0.(E is a “Boolean function” of D, S)001011110000ESDBoolean CircuitESDEd goes to the party if Dan doesn’t and Stella doesBoolean “algebra”A AND B written as A · BA OR B written as A + B0 + 0=01 + 0 =11 + 1=10 · 0 =00 · 1 =01·1 = 1Funny arithmeticBoolean gatesOutput voltage is high if both input voltages are high, otherwise output voltage lowHigh voltage = 1Low voltage = 0xxx xyyx · yx + yShannon (1939)Output voltage is high if either input voltage is high, otherwise output voltage lowOutput voltage is high if input voltage is low,otherwise output voltage lowClaude Shannon (1916-2001)founder of many fields (circuits, information theory, artificialintelligence…)With “Theseus” mouseCombinational circuit Boolean gates connected by wires Important: no cycles allowedWires: transmit voltage(and hence value)Examples(Sometimes we use thisfor shorthand)4-way ANDMore complicated exampleCombinational circuits and control “If data has not arrived and packet has been sent, send a signal”Packet sent?Data arrived?ESDCircuits compute functions Every combinational circuit computes a Boolean function of its inputsInputs OutputsBen RevisitedBen only rides to class if he overslept, but even then if it is raining he’ll walk and show up late to class (he really hates to bike in the rain). But if there’s an exam that day he’ll bike if he overslept, even in the rain.B: Ben BikesR: It is rainingE: There is an exam todayO: Ben oversleptGive boolean expression for B in terms of R, E and OBen’s truth table11110011110110010110001001000000BEROGoing from truth table to Boolean expression Take OR of all input combinations that lead to 1B = O·R·E + O·R·E + O·R·E11110011110110010110001001000000BEROAside: AND, OR, and NOT gates suffice to implement every boolean function!Sizes of representations For k variables:1…11……………………1…100…100…000…00X…BAk + 12k1073741824104857610242k302010kTools for reducing size: (a) circuit optimization (b) modular designExpression simplification Some simple rules:x · 1 = xx · 0 = 0x + 0 = xx + 1 = 1x + x = x · x = xx · (y + z) = x · y + x · zx + (y · z) = (x+y) · (x+z)x · y + x · y= x · (y + y)= x · 1= xDe Morgan’s Laws:x · y = x + yx + y = x · ySimplifying Ben’s circuit B = O·R·E + O·R·E + O·R·E= O·(R·E + R·E + R·E)= O·(R·(E + E) + R·E)= O·(R + R·E)= O·((R + R) · (R + E))= O·(R + E)Something to think about: How hard is Circuit Verification? Given a circuit, decide if it is trivial (either it always outputs 1 or always outputs 0 no matter the input) Alternative statement: Decide if there is any setting of the inputs that makes the circuit evaluate to 1. Time required?Boole’s reworking of Clarke’s “proof” of existence of God(see handout) General idea: Try to prove that Boolean expressions E1, E2, …, Ekcannot simultaneously be true Method: Show E1· E2 · … · Ek= 0 Discussion for next time: What exactly does Clarke’s “proof” prove? How convincing is such a proof to you?Also: Do Google search for “Proof of God’s Existence.”Going beyond combinational circuits Need 2-way communication between circuits (i.e., need to allow cycles!) Need memory (scratchpad)CPUEthernet cardCircuit for Binary Addition?25= 1100129= 11101--------------110110Read handout: Will discuss next time.Worked out example: Going from truth table to Boolean expression Take OR of all input combinations that lead to 1X = A·B·C + A·B·C + A·B·C +


View Full Document

Princeton COS 116 - Logic

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

23 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

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 Logic
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 Logic 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 Logic 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?