Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 11 Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : 1.

Similar presentations


Presentation on theme: "Chapter 11 Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : 1."— Presentation transcript:

1 Chapter 11 Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : woodall@mc.edu) 1

2 Its about Bits… 1 High circuit Magnetized spot bump 0 Low circuit Demagnetized spot land 2

3 And Mostly Manipulating Bits… ASCII characters – Bit patterns assigned arbitrarily. – Bits are not manipulated. Numbers, colors, images, video – Bit patterns are not arbitrary. – Bits are manipulated with mathematics. 3

4 Remember the Number Systems? Decimal number system – We know this! – base 10 – 10 symbols 0 - 9 – e.g. 1,375 The place values of 1, 3 7 5 are… 10 3 10 2 10 1 10 0 And it can be written in expanded form as (1 * 10 3 ) + (3 * 10 2 ) + (7 * 10 1 ) + (5 * 10 0 ) Binary number system – Remember this? – base 2 – 2 symbols 0 – 1 – e.g. 1001 Similarly the place values of 1001 are… 2 3 2 2 2 1 2 0 And it can be written in expanded form as (1 * 2 3 ) + ( 0 * 2 2 ) + (0 * 2 1 ) + ( 1 * 2 0 ) 4

5 Colors A color code is 3 bytes: RGB (byte 1 for Red, byte 2 for Green, byte 3 for Blue) 3 bytes = _________bits The lower the number in the byte, the lower the intensity of that color. The fact that a color is a group of bits means we can handle a color like a number – doing arithmetic to manipulate the color. 5

6 Colors Black Red byte Green byte Blue byte Binary: 0000 0000 0000 0000 0000 0000 Hexadecimal: 00 00 00 Decimal: 0 : 0 : 0 White Binary:1111 1111 1111 1111 1111 1111 Hexadecimal: FF FF FF Decimal: 255 : 255 : 255 6

7 Colors RGB values where R = G = B are gray If we ADD the same value to each byte we get a lighter gray. If we SUBTRACT the same value from each byte we get a darker gray. 7

8 Adding Binary Numbers Addition Facts 0 +0 0 +1 1 +0 1 +1 10 1 +1 11 8

9 Adding Binary Numbers 1 0 1 1 1 1 0 0 1 1 1 +0 0 1 1 1 0 1 0 1 1 1 0 1 1 0 1 9

10 Adding to Gray Gray: 0011 1001 0010 1001 0010 1001 +0111 1010 +0111 1010 +0111 1010 Lighter Gray: 1011 0011 1011 0011 1011 0011 Look at the Moon Photo discussion in the text. 10

11 Overflow Overflow occurs when the computer does arithmetic and the answer will not fit where it needs to go. Software should handle overflow in a reasonable manner. Allowing sufficient bytes for the answer is a common way to handle it. 11

12 File Compression To compress a file means to reduce the number of bits in the file, thereby making it take up less space. Mathematics is used to do file compression. This is especially important for files downloaded over the Web, or those stored in limited space like a CD or DVD or camera memory card. 12

13 Sound Mathematics is used to compress, clean up and change sound. Sound is a continuous vibration causing a pressure wave. The input device samples the wave at regular intervals storing a long sequence of bytes in memory. Sampling Rate=the number of samples taken per second 13

14 Sound Sound In The sound wave is detected by a microphone. The microphone converts the sound wave into an equivalent electrical wave. The electrical wave goes into an analog-to-digital converter for sampling. The binary samples go into RAM. Sound Out The binary samples come from RAM. They go into a digital-to- analog converter. The DAC creates an electrical wave using interpolation. The electrical wave goes to a speaker which vibrates creating the sound wave. 14

15 Sound MP3 (MPEG level 3) compression One of the most popular compression techniques for music Removes sounds we cannot hear and noise Resulting file is about 1/10 the size of the original A lossy compression technique 15

16 Images An image file is a long sequence of RGB pixel data. Mathematics is used to manipulate and compress image files. 16

17 Images JPEG compression – One of the more common compression techniques for images – Best for photos and complex graphics – The resulting file is about 1/20 the size of the original file – Amount can be controlled – An overall lossy compression technique 17

18 Run-Length Compression Which representation takes up less space? r 1 g 1 b 1 r 2 g 2 b 2 r 2 g 2 b 2 r 2 g 2 b 2 r 2 g 2 b 2 r 2 g 2 b 2 r 2 g 2 b 2 r 2 g 2 b 2 r 2 g 2 b 2 r 2 g 2 b 2 r 2 g 2 b 2 r 2 g 2 b 2 r 2 g 2 b 2 r 2 g 2 b 2 r 3 g 3 b 3 Or r 1 g 1 b 1 [13 * r 2 g 2 b 2 ] r 3 g 3 b 3 18

19 Images GIF compression Another commonly used compression technique for images A lossless compression technique Best for icons, cartoons, and simple graphics Strictly uses run-length encoding. PNG format may eventually replace GIF 19

20 Video MPEG ( MPEG-2, MPEG-4 ) compression A commonly used compression technique for video Records differences between frames A lossy compression technique 20


Download ppt "Chapter 11 Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : 1."

Similar presentations


Ads by Google