1 / 11

CSE111: Great Ideas in Computer Science

CSE111: Great Ideas in Computer Science. Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739 alphonce@buffalo.edu. Announcements. No recitations this week or next. First meeting of recitations in week of 1/25-1/29. Extra copies of syllabus available at front of class.

susan
Télécharger la présentation

CSE111: Great Ideas in Computer Science

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. CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739 alphonce@buffalo.edu

  2. Announcements • No recitations this week or next. First meeting of recitations in week of 1/25-1/29. • Extra copies of syllabus available at front of class

  3. cell phones off (please)

  4. Today • Representing data • Binary numbers

  5. Images Each pixel encodes the amount of RED, GREEN and BLUE (RGB). This is an additive color scheme. Printing uses CYAN, MAGENTA, YELLOW and BLACK (CMYK). This is a subtractive color scheme.

  6. Morse Code • Dots, dashes and spaces used to represent letters/digits • http://www.planetofnoise.com/midi/morse2mid.php • Two features: • variable length encodings • not a prefix code

  7. Spaces of different lengths is needed to decode unambiguously. Without spaces, how many ways can six dots in a row be decoded?

  8. five 5 cinq

  9. Counting Decimal (base 10) Binary (base 2) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 etc. 0 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 etc.

  10. Bit string • A ‘0’ or ‘1’ is a binary digit, or a bit. • A sequence of bits is called a bit string. • For example: • 1101 is a bit string

  11. Number systems Decimal (base 10) Binary (base 2) Each position is weighted by a power of 2. E.g. 111 = 1*4 + 1*2 + 1*1 = “seven” 1*22 + 1*21 + 1*20 E.g. 1101 = 1*8 + 1*4 + 0*2 + 1*1 = “thirteen” 1*23 + 1*22 + 0*21 + 1*20 • Each position is weighted by a power of 10. • E.g. 734 = • 7*100 + 3*10 + 4*1 • 7*102 + 3*101 + 4*100 • E.g. 1101 = • 1*1000 + 1*100 + 0*10 + 1*1 • 1*103 + 1*102 + 0*101 + 1*100

More Related