Presentation is loading. Please wait.

Presentation is loading. Please wait.

Information in Computers. Remember Computers Execute algorithms Need to be told what to do And to whom to do it.

Similar presentations


Presentation on theme: "Information in Computers. Remember Computers Execute algorithms Need to be told what to do And to whom to do it."— Presentation transcript:

1 Information in Computers

2 Remember Computers Execute algorithms Need to be told what to do And to whom to do it

3 Question How does the computer know what to act on?

4 Answer We tell it WHERE NOT WHAT

5 Implications Doesn’t know what it is acting on So, it doesn’t care if it is adding 3 to 5 or 7 million to 10 billion: Just an add! [That’s how a calculator works!]

6 Computer trusts you! Told it that there was a number there And you put a string there: It will treat it as a NUMBER You may not like the result [one of the ways that people hack computers!]

7 What can be stored in a computer? Instructions Numbers Text Pictures Audio Video

8 How is it stored? 1s and 0s “bits is bits” The same series of 0s and 1s can mean different things! Question of interpretation!

9 Numbers

10 Storing an integer Computer only has 2 values it can use: 0, 1 How many do we have? 0-9 So how do we represent the tenth value? Place-value system

11 Binary Numbers With one “bit”, I can represent just two values With two bits: 0 or 1 “twos” 0 or 1 “ones” Total of four values

12 Binary Numbers for People All those 0s and 1s are hard to read Group them in 4s (like credit card numbers) Then write them in decimal But WAIT! Goes to 15 Use letters A-F

13 Storing numbers should be easy, right? How big is a number? How do you indicate a negative number? How do you represent a fraction? Remember scientific notation? Id there an equivalence for computers? Does any of this matter to you?

14 How to represent fractions How to represent 1/3?.3.33.333 Representation can change the result! What is easy in decimal, may not be easy in binary! [embezzlers can take advantage of rounding issues!]

15 Text

16 Storing Characters Also need to be converted to 0s and 1s Numerous encodings ASCII, ANSI, ISO support a single language UTF-8 (Unicode) supports all languages Examples: A 0100 0001 B 0100 0010 a0110 0001 b0110 0010 [Can you guess why some alphabetizing puts ALL capitals before lowercase?]

17 Storing Strings When do they end? Known length Give length Signal end Signaling the end is the most common way

18 Images

19 Black and White Pictures

20 Pictures are stored as pixels Monochrome: BLACK or WHITE

21 What is needed? Different levels of black and white Shades of gray Percentage of black

22 ASCII Images (picascii.com)picascii.com Instead of pixels, use characters

23 Color PicturesColor Pictures

24 Color????? But all I can store is 1s and 0s! Let’s see how we can represent colors!

25 Colors

26 Colors – Paint (Subtractive Color Model) Primaries: magenta, yellow, and cyan This color system is called subtractive because: each primary color absorbs (subtracts) a certain part of the color spectrum. every time a color is added, less light is reflected. When you mix all three primaries together, the entire spectrum of color is absorbed, and we’re left with black.

27 Colors - Lights (Additive Color System) Primaries: Red, Blue, Green Additive color systems start without light (black). Light sources combine to make a color. As colors are added, the resulting color is brighter.

28 Colors (colorpicker.com)colorpicker.com We’ll be working with the additive color system Mix various amounts of red, green, and blue to create a color. Colors can be represented by rgb (red#, green#, blue#) Each color is indicated by a number from 0-255 (0,0,0) = black (255,255,255) = white

29 Color Pictures

30 What is a Color Pixel? Red Green and Blue Each has a value from 0 to 255

31 Formats

32 Many Formats jpeg or jpg, png, tif, gif, … Different encodings, different sizes Actually different ways to COMPRESS them Why compression? 1000 red pixels in a row… That’s why they are different sizes

33 Video

34 The picture part What is film? Series of pictures taken (and shown) close enough together to fool the eye Known as the frame rate Sampling the reality

35 Audio

36 Sampling Like video, sample it fast enough and we can fool the ear But what is that is sampled?

37 Digital Sound (with apologies to physics majors) Sound waves cause the air to vibrate Vibrations have frequencies (how fast they move) A specific sound can be represented by how much of each frequency it has (just like a pixel is how much of each color it has)

38 Homework

39 Filezilla We will be using these tools on Tuesday 130 people can NOT download Just download Filezilla DO NOT TRY TO SET IT UP Will discuss on Tuesday

40 AnyConnect If you live off campus or will be traveling, you will need AnyConnect You can only download it on campus Can NOT use it on campus We will provide instructions

41 Chrome Everything we do should work on all browsers BUT it works differently We therefore REQUIRE that you use Chrome

42 AFS access AFS is the system that the university uses to manage files You don’t need to know anything about it You DO need to have it enabled for your onyen Enabling is not instantaneous


Download ppt "Information in Computers. Remember Computers Execute algorithms Need to be told what to do And to whom to do it."

Similar presentations


Ads by Google