Presentation is loading. Please wait.

Presentation is loading. Please wait.

Last time 3 main components to a computer system Types of computers Talked about software – task oriented What are some kinds of data that a computer works.

Similar presentations


Presentation on theme: "Last time 3 main components to a computer system Types of computers Talked about software – task oriented What are some kinds of data that a computer works."— Presentation transcript:

1 Last time 3 main components to a computer system Types of computers Talked about software – task oriented What are some kinds of data that a computer works with?

2 Binary Data Binary is what HOW the data is represented. Binary refers to 0s and 1s

3 Binary number system Why do we use binary number system in a computer system? Size of data –For every byte, there are 8 bits –Bit = 0 or 1 –Byte = 8 bits

4 How we measure bytes? Use the prefix: Kilo Mega Giga tera A computer has a 20 gig hard drive = about 20 billion bytes

5 What a byte can represent: The same byte 01000011 can represent multiple things: The number 67 The letter ‘C’ A small fraction of a sound, like a song (many sound parts make up the song) A small pixel in a graphic or video (many dots make up the picture) A small step in a computer program What is this language?

6 What is ASCII? What does it stand for? Definition: How it works – the translation

7 Benefits of ASCII low susceptibility to viruses or worms to the text only format. No variance in binary representation of data (global )

8 Bits and Bytes We can count in binary 0 = 000000001 = 00000001 2 = 000000103 = 00000011 6 = 00000110 9 = 00001001 10 = 00001010 Etc…

9 Representing Data In Bytes

10 characters Translate binary to a word in English

11 GRAPHICS- Color Representation In simple graphics a byte can represent a single pixel grayscale imagery 1 byte can hold 256 differ shades of gray White = 00000000Black = 11111111

12 Color Representation– ASCII Modern video games and colorful graphics use several bytes for each pixel (Nintendo 64 uses 8 bytes = 64 bits for each pixel to get a huge array of possible colors).

13 Pictures Num of bytes per pixel matters! –Why do you think that is?

14 Bit Map What is a bit map? Why do we care?

15 Formats for differ images For graphics, there are several standards or formats for pictures.

16 .JPG &.GIF The two most common by far are GIF and JPG files Both of these formats encode static bitmap images. Why do we see so much of these formats?

17 .JPG &.GIF differences In a bitmap image, the image file has to define the exact color of every pixel in the image For example, a bitmap on the web is (typical) 400 by 400 pixels. What problems do you see with this?

18 Compression When downloading files off the Internet, you've probably encountered ZIP files –Suffit for MAC OS users, WinZip for Windows users –Both expand/compress files on command without compromising the integrity of the original file or end result This compression system is a very handy invention Why is it important to compress files?

19 How it works: –Finds redundancy and eliminates it– Most types of computer files are fairly redundant –In John F. Kennedy's 1961 inaugural address, he delivered this famous line: –"Ask not what your country can do for you -- ask what you can do for your country.“ –"ask" appears two times –"what" appears two times –"your" appears two times –"country" appears two times –"can" appears two times –"do" appears two times –"for" appears two times –"you" appears two times

20 File compression uses an adaptive dictionary- based algorithm to shrink files –Creates a new local dictionary, and uses a number system to identify info. Dictionary 1.ask 2.what 3.your 4.country 5.can 6.do 7.for 8.you new phrase : "1 not 2 3 4 5 6 7 8 -- 1 2 8 5 6 7 3 4" When sending/compressing file, the actual dictionary file is saved along with the new phrase representation.

21 .GIF File Compression In a GIF image, the number of colors is reduced to 256 and then "runs" of same-color pixels are encoded in a color+numberOfPixels format..GIF’s algorithm example

22 JPG File Compression Different kind of algorithm (mathematical formula to solving a computer problem) In compressing a JPG file, JPG plays with the quality of the file in reducing its size.

23 Downside to Compression Quality. Quality can be lost since it is an approximation of the picture which is being saved when compressing


Download ppt "Last time 3 main components to a computer system Types of computers Talked about software – task oriented What are some kinds of data that a computer works."

Similar presentations


Ads by Google