19
Oct 13 fit100-08-digital 1 The Information School of the University of Washington Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology http://courses.washington.edu/info100/

The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Embed Size (px)

Citation preview

Page 1: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 1

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

Digital Representation

INFO/CSE 100, Fall 2006

Fluency in Information Technology

http://courses.washington.edu/info100/

Page 2: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 2

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

Readings and References

• Reading» Fluency with Information Technology

• Chapter 8, Bits and the "Why" of Bytes

Page 3: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 3

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

Info Representation

• Digitization: representing information by any fixed set of symbols» decide how many different items of information you want

to represent• Tic Tac Toe: 2 items - player 1 or player 2

» decide how many "digits" or positions you want to use• Tic Tac Toe: 1 position - a board square, 9 squares total

» decide on a set of symbols• player 1: • player 2:

Page 4: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 4

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

Are two symbols enough?

We can represent each player's move this way, but what about representing the whole

game?

Page 5: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 5

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

Empty position:

• Now we can represent this game as one 9-digit length string:

• How many possible game states are there?» 333333333 = 39 = 19,683

use this set of symbols• empty cell: • player 1: • player 2:

Page 6: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 6

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

Another encoding

2

1

0

0

1

0

0

2

0

• Now we can represent this game as one 9-digit number: 2 0 0 1 1 2 0 0 0

• How many possible game states are there?» 333333333 = 39 = 19,683

use a different set of symbols• empty cell: 0• player 1: 1• player 2: 2

Page 7: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 7

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

Info in the Physical World

• Physical world: Present and Absent (PandA)» The most fundamental representation of

information is presence/absence of a phenomenon

Any controllable phenomenon works: define it right

Page 8: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 8

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

Info in the Logical World• Logical World:

» Information, reasoning, computation are formulated by true/false and logic • All men are mortal

• Aristotle is a man

• Aristotle is mortal

• True and false can be the patterns for encoding information

0 0 1 0

Page 9: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 9

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

Lets Raise our Hands

Page 10: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 10

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

Connect Physical/Logical

• The power of IT comes from the fact that physical and logical worlds can be connected

Present represents true / Absent represents false

-- or maybe vice versa --

Memory

false true false false false true true false true false true false false false

0 1 0 0 0 1 1 0 1 0 1 0 0 0

Page 11: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 11

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

Bits

• PandA is a binary representation because it uses 2 patterns

• Tic Tac Toe had 3 patters and thus was not binary

• The word "bit"» is a contraction for “binary digit”» represents a scenario being set and detected in 2

patterns

Page 12: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 12

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

Possible Interpretations of Bit PatternsPresent

Absent

True

False

1

0

On

Off

Yes

No

+

-

Black

White

For

Against

Yang

Ying

Page 13: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 13

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

Assigning Symbols for Characters26 uppercase and 26 lowercase letters in English, plus10 digits, plus20 basic punctuation characters= 95 distinct characters

Representing this many characters in binary takes 7 bits!26 (6 bits) gives 64 symbols27 (7 bits) gives 128 symbols

7-bit code for characters is ASCII(American Standard Code for Information Interchange)

Page 14: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 14

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

8-bit ASCII

0100 01100100 10010101 0100

More hands!

Page 15: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 15

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

Bytes

• A byte is eight bits treated as a unit» Adopted by IBM in 1960s» A standard measure until very recently» Bytes encode the Latin alphabet using ASCII --

the American Standard Code for Information Interchange

0100 01100100 10010101 0100

How many bytes?!?

Page 16: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 16

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

Unicode

• Although 8-bit ASCII is widely used, there is a problem!!!» Can’t support more than 256 characters» This eliminates more than half of the world’s

language from the character set

• Unicode is a 16-bit representation» Supports 65,536 symbols» Can handle all languages

0100 0110 0000 1001

Page 17: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 17

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

HTML Encoding

• 8bit ASCII : 256 Characters» <meta http-equiv="content-type”

content="text/html; charset=iso-8859-1” />

• 16bit Unicode: 65,536 Characters» <meta http-equiv="content-type”

content="text/html; charset=UTF-8” />

Page 18: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 18

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

So Everything can be a 1 or a 0?

• A Chair can be a 1 or 0?» Letters C H A I R -> ASCII Code -> 1/0» Description of chair in words» How advanced can we get?

• Picture of the chair 1/0s?

• Movie of the chair?

• Interactive 3D model of the chair?

Page 19: The Information School of the University of Washington Oct 13fit100-08-digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology

Oct 13 fit100-08-digital 19

Th

e I

nfo

rmati

on

Sch

ool

of

the U

niv

ers

ity o

f W

ash

ing

ton

Summary

• IT joins physical & logical worlds» Symbols represent things 1-to-1» Create symbols by grouping patterns» PandA representation is fundamental

• presence and absence

• Can be represented in binary

» Bit, a place where 2 patterns set/detect» ASCII is a byte encoding of Latin alphabet