15 September - PowerPoint PPT Presentation

About This Presentation
Title:

15 September

Description:

Court Rules Against Pennsylvania Law That Curbs Child-Pornography Sites ... Mantissa exponent. Three Parts. Sign Bit. Exponent. Mantissa. From Microsoft ... – PowerPoint PPT presentation

Number of Views:31
Avg rating:3.0/5.0
Slides: 22
Provided by: poze
Learn more at: http://wwwx.cs.unc.edu
Category:

less

Transcript and Presenter's Notes

Title: 15 September


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/11fil
    ter.html?th

3
Review Integers
  • Binary
  • Stored in words (32 bits) or half-words (16 bits)
  • Twos complement used to store negative numbers
  • Max positive integer 2n-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 1017
  • 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 X20 (2016)
  • 2 X32 9 X39
  • A X41 Z X5A
  • a X61 z X7A
  • http//www.webopedia.com/quick_ref/asciicode.asp

15
ASCII collating
  • Space X20, 2 X32, A X41, a X61 z
    X7A
  • For collating sequence, where should punctuation
    be?
  • General rule
  • space lt punctuation lt number lt letter
  • Most common punctuation X21 X2F
  • How to deal with case?
  • Collating sequence is case insensitive
  • Need to force to uppercase

16
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

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 20th
  • Due the 22nd
  • Will have time for questions on Monday
  • Intended to be a 30 minute test
  • Not timed
Write a Comment
User Comments (0)
About PowerShow.com