Presentation is loading. Please wait.

Presentation is loading. Please wait.

15 September How Computers Work: Other Forms of Data.

Similar presentations


Presentation on theme: "15 September How Computers Work: Other Forms of Data."— Presentation transcript:

1 15 September How Computers Work: Other Forms of Data

2 Current events Court Rules Against Pennsylvania Law That Curbs Child-Pornography Sites law forced Internet service providers to block customers' access to Web sites thought to be distributing child pornography http://www.nytimes.com/2004/09/11/technology/11filter.html?th

3 Review: Integers Binary Stored in words (32 bits) or half-words (16 bits) Two’s complement used to store negative numbers Max positive integer = 2 n-1 - 1

4 Questions?

5 Using Integers Not always whole numbers Invisible decimal points Can be used to represent fractional units 1 = 1 cent 1 = 1 ml Using integers avoids rounding errors

6 Floating Point Numbers Represent much larger number Scientific notation 1.452 x 10 17 Mantissa exponent Three Parts Sign Bit Exponent Mantissa

7 From Microsoft Calculator Understanding Extended Precision: Extended Precision, a feature of Calculator, means that all operations are accurate to at least 32 digits. Calculator also stores rational numbers as fractions to retain accuracy. For example, 1/3 is stored as 1/3, rather than.333. However, errors accumulate during repeated operations on irrational numbers.

8 Dates Lots of formats for dates Some store month, day, year Some store a day and year Some store a single number Different origins Different amount of space to store

9 Lots of Calendars

10 Excel Microsoft Excel stores dates as sequential numbers. January 1, 1900 is 1 January 1, 2008 is 39448 (39,448 days after January 1, 1900) Stores times as decimal fractions because time is considered a portion of a day. Except, on the Macintosh, 1 = January 1, 1904! Rules on interpreting 2 digit years …

11 Y2K What was the problem? What caused the problem? Was the problem limited to our calendar? How did people solve the problem? How would you have solved the problem?

12 Text Need to represent characters All data in the computer is stored as _____ Letter a question of interpretation Also includes some control: new line, tab, … Not font: the appearance is referred to as a glyph Representations ASCII, EBCDIC, UNICODE, … ASCII simplest Most applications moving to UNICODE

13 Valuable Characteristics Collating sequence Simple upper/lower case Support of all languages Other?

14 ASCII Some encodings Space: X’20’ (20 16 ) 2: X’32’ … 9: X’39’ A: X’41’ … Z: X’5A’ a: X’61’ … z: X’7A’ http://www.webopedia.com/quick_ref/asciicode.asp

15 ASCII collating Space: X’20’, 2: X’32’, A: X’41’, a: X’61’ … z: X’7A’ For collating sequence, where should punctuation be? General rule: space < punctuation < number < letter Most common punctuation X’21’ – X’2F’ How to deal with case? Collating sequence is case insensitive Need to force to uppercase

16 Uppercase algorithm A (41 16 ) 0100 0001 a (61 16 ) 0110 0001 Z (5A 16 ) 0101 1010 z (7A 16 ) 0111 1010 To uppercase a letter, simply turn off the bit xx0x xxxx

17 Multiple languages Used to have complete different set of encodings for each language, called code pages Unicode is fundamentally 2-bytes Preserves the ASCII values Doubles the size of files www.unicode.org

18 Formatted Documents Not all formatting information is included in the character information We already mentioned font Two ways to handle formatting WYSIWYG (What You See Is What You Get) Word DOC PDF (Adobe) Formatting language HTML used for web

19 Graphics Two fundamental methods of storing data Bit maps – individual dots to be displayed Vector graphics – lines to be displayed When using bit graphics, need intelligent way to store Compression techniques Long strings of the same value Minor changes from picture to picture JPEG, MPEG, …

20 Coming Attractions Next week we start talking about how computers have affected society Assignment Scan references (94, 95, 00) See course home page Identify key impacts at different levels (for discussion not handing in) Personal Community National Global Future

21 Take Home Quiz When? Handed out on the 20 th Due the 22nd Will have time for questions on Monday Intended to be a 30 minute test Not timed


Download ppt "15 September How Computers Work: Other Forms of Data."

Similar presentations


Ads by Google