1 / 26

COS 111 Review Session 1

COS 111 Review Session 1. Friday, March 4, 2005. Outline. All About Numbers Boolean/Logic Circuits Assignment 4 Questions. Can you say five ?. Say five. Dutch – vijf German – fünf French – cinq Spanish – cinco Hindi – paanch Slang -- Lincoln Math -- 5. Say five. Dutch – vijf

domani
Télécharger la présentation

COS 111 Review Session 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COS 111 Review Session 1 Friday, March 4, 2005

  2. Outline • All About Numbers • Boolean/Logic Circuits • Assignment 4 • Questions

  3. Can you say five ?

  4. Say five Dutch – vijf German – fünf French – cinq Spanish – cinco Hindi – paanch Slang -- Lincoln Math -- 5

  5. Say five Dutch – vijf German – fünf French – cinq Spanish – cinco Hindi – paanch Slang – Lincoln Math -- 5 Spoken form

  6. Say five Dutch – vijf German – fünf French – cinq Spanish – cinco Hindi – paanch Slang – Lincoln Math -- 5 Visual form

  7. When is five not five • When using different langauges • GM called one of their small cars "Nova". They didn't sell too many in Spain where 'NoVa' means “doesn’t go” • Math has many sub-dialects – binish, tertiarist, octalish, hexadecimalish, AnyNish (I am making the names up but that’s not the point :))

  8. How much is 10 ? • You need to know what language it is being spoken in • V in roman numerals refers to decimal 5 but refers to decimal 31 in hexatridecimalish • How do we translate from one dialect to another ? • We need to understand the structure of math-dialects

  9. Closer look at Roman Numerals • Pick a few agreed upon quantities – I, V, X, L, C, D, M • Express all other numbers as sums and differences of above – 7 is VII, 19 is XIX, 10000 is MMMMMMMMMM • Not very convenient as numbers become large • Structure also cumbersome – 41 is XLI or IXL

  10. Penta System • Instead of sums and differences, can we use multiplication to provide structure to number ? • MMMMMMMMMM can be X-M • But a odd collection I, V, X, L, C, D, M wont do • Pick 5 symbols – 0, 1, 2, 3, 4. Why 5 ? • Its arbitrary. • It doesn’t matter what the base is as long as its fixed

  11. Lets count… 0 1 2 3 4 What now ? We need to combine our symbols to come up write bigger numbers

  12. Lets count… 0 1 2 3 4 What now ? We have made one pass over all symbols. So lets note down that fact. One pass and no more.

  13. Lets count… 0 1 2 3 4 10 – lets call this a fif We now use position of a symbol in a number to hold its value.

  14. Lets count… 0 1 2 3 4 10 10 – fif 11 – fif one 12 – fif two 13 – fif three 14 – fif four 20 -- twofif

  15. Lets count… 0 1 2 3 4 10 10 11 12 13 14 20 20 21 22 23 24 30 30 31 32 33 34 40 40 – fourfif 41 – fourfif one 42 – fourfif two 43 – fourfif three 44 – fourfif four 100 – fiffif We now use position of a symbol in a number to hold its value

  16. Penta System • A number ABCDE is hence • A fif-fif-fif-fif + • B fif-fif-fif + • C fif-fif + • D fif + • E • A*fif^4 + B*fif^3 + C*fif^2 + D*fif + E

  17. b System • A number Xk-1….X0 in base b is • Sum of Xi-1*b^i for i from 0 to k-1 • All rules of multiplication, addition, subtraction are similar to what we normally do in base 10 numbers

  18. Lets do some practice • Conversion from one base to another • Subtraction, addition, multiplication in any base • Suggest numbers and operations and we work it out together.

  19. Before we move to next topic… • Old number systems joke – • Why is Christmas like Halloween ? • Because 31 oct = 25 dec

  20. Outline • All About Numbers • Boolean/Logic Circuits • Assignment 4 • Questions

  21. Boolean Algebra • Shorthand for writing and thinking about logic circuits • Notation • ' is a NOT • . is an AND • + is an OR • 1 represents TRUE • 0 represents FALSE

  22. Some simple rules • (A ') ' = A • (A ' + A) = 1 • A + 0 = A • A + 1 = 1 • (A '.A) = 0 • A.0 = 0 • A.1 = A • A + A = A • A.A = A

  23. Distributive Laws • E +(E1.E2...En) = (E+E1).(E+E2)...(E+En) • E.(E1+E2+...En) = (E.E1) + (E.E2)... + (E.En)

  24. DeMorgan’s Laws • (E1 + E2 + ... + En)' = E1'.E2'....En' • (E1.E2...En)' = E1' + E2' + ... + En'

  25. Lets try some examples • x'.y + x.y + x • x.y.z + x'.y.z + x'.y'.z + x'.y'.z + x.y'.z' + x.y'.z • x'.y + x'.y' + x.y' + x.y

  26. Outline • All About Numbers • Boolean/Logic Circuits • Assignment 4 • Questions

More Related