Top Banner
15 September How Computers Work: Other Forms of Data
21
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 15 September How Computers Work: Other Forms of Data.

15 September

How Computers Work:Other Forms of Data

Page 2: 15 September How Computers Work: Other Forms of Data.

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

Page 3: 15 September How Computers Work: Other Forms of Data.

Review: Integers

Binary Stored in words (32 bits) or half-

words (16 bits) Two’s complement used to store

negative numbers Max positive integer = 2n-1 - 1

Page 4: 15 September How Computers Work: Other Forms of Data.

Questions?

Page 5: 15 September How Computers Work: Other Forms of Data.

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

Page 6: 15 September How Computers Work: Other Forms of Data.

Floating Point Numbers Represent much larger number Scientific notation

1.452 x 1017

Mantissa exponent

Three Parts Sign Bit Exponent Mantissa

Page 7: 15 September How Computers Work: Other Forms of Data.

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.

Page 8: 15 September How Computers Work: Other Forms of Data.

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

Page 9: 15 September How Computers Work: Other Forms of Data.

Lots of Calendars

Page 10: 15 September How Computers Work: Other Forms of Data.

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 …

Page 11: 15 September How Computers Work: Other Forms of Data.

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?

Page 12: 15 September How Computers Work: Other Forms of Data.

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

Page 13: 15 September How Computers Work: Other Forms of Data.

Valuable Characteristics

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

Page 14: 15 September How Computers Work: Other Forms of Data.

ASCII

Some encodings Space: X’20’ (2016) 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

Page 15: 15 September How Computers Work: Other Forms of Data.

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

Page 16: 15 September How Computers Work: Other Forms of Data.

Uppercase algorithm

A (4116) 0100 0001 a (6116) 0110 0001 Z (5A16) 0101 1010 z (7A16)

0111 1010 To uppercase a letter, simply turn

off the bit xx0x xxxx

Page 17: 15 September How Computers Work: Other Forms of Data.

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

Page 18: 15 September How Computers Work: Other Forms of Data.

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

Page 19: 15 September How Computers Work: Other Forms of Data.

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, …

Page 20: 15 September How Computers Work: Other Forms of Data.

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

Page 21: 15 September How Computers Work: Other Forms of Data.

Take Home Quiz

When? Handed out on the 20th

Due the 22nd Will have time for questions on

Monday Intended to be a 30 minute test

Not timed