Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Introduction to Computers CS1100.01 Dr. Zhizhang Shen Chapter 8: How does.

Similar presentations


Presentation on theme: "Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Introduction to Computers CS1100.01 Dr. Zhizhang Shen Chapter 8: How does."— Presentation transcript:

1 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Introduction to Computers CS1100.01 Dr. Zhizhang Shen Chapter 8: How does a Computer Know?

2 1-2 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-2 What about it? To process data, a computer has to remember all these data, and also keep the results. The question is how do we tell the computer what data to remember and how to do it?

3 1-3 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-3 Digitizing discrete information Digitize: Represent information with digits (normally base 10 numerals) Symbols, a short version –Digits have the advantage of having short names (easy to say), and a natural order, 0, 1, …, 9. –But computer professionals are shortening symbol names (exclamation point is pronounced "bang") Alternative representation: Any set of symbols could represent phone number digits, as long as the keypad is labeled accordingly. We also often use letters, BOSS

4 1-4 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-4

5 1-5 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Base 10 vs base 2 Most of the computers use electrical powers. Thus, representation of digits has to rely on related quantities, such as voltage. Voltage is not stable so it is tough to come up with stable representation of digits. On the other hand, two digits can be very stably represented. 8-5

6 1-6 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-6 The Fundamental representation of Information The most basic form of info representation is the presence or absence of a physical phenomenon In the logical world, the concepts of true and false are important –By associating true with the presence of a phenomenon and false with its absence, we use a word to implement the logical world, and produce information technology Anything can be represented as a sequence of 0 and 1.

7 1-7 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-7 The PandA Representation PandA is the mnemonic for "presence and absence" It is discrete (distinct or separable)—the phenomenon is present or it is not (true or false; 1 or 0). There is a tiny gap in between. Again, more samples (pixels), the better; but more space it takes and more time it takes to process this much information. Thus, the need for more space and higher speed.

8 1-8 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-8 A Binary system Two patterns make a binary system –Base 2 (0 or 1) The basic binary unit is known as a "bit" (short for binary digit) Eight bits are grouped together to form a byte –Memory accessed by byte addresses We can give any names to these two patterns as long as we are consistent –PandA (Presence and Absence can represent 1 and 0, respectively)

9 1-9 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-9

10 1-10 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-10 Alternative PandA encodings There are other ways to encode two states using physical phenomena –Use stones on all squares, black stones for one state and white for the other –Use multiple stones of two colors per square, saying more black than white means 0 and more white than black means 1 –Stone in center for one state, off-center for the other –etc.

11 1-11 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-11

12 1-12 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-12 Bits in computer memory Memory is arranged inside a computer in a very long sequence of bits (places where a phenomenon can be set and detected) In a 32 bit machine, four bytes (32 bits) becomes a computer word, and has its own address. The address depends on the number of words We use address to write into, or read from, a word.

13 1-13 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-13 Encoding bits on a CD-ROM

14 1-14 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-14 Encoding bits on a CD-ROM

15 1-15 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-15 Combining bit patterns Since we only have two patterns, we must combine them into sequences to create enough symbols to encode necessary information To get a 2, we use 10, and use 11 for 3, etc. Binary (PandA) has 2 patterns, arranging them into n-length sequences, we can create 2 n symbols

16 1-16 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-16

17 1-17 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-17

18 1-18 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-18 Number represented in 0 and 1 261= 2 *100 + 6 *10 +1 = 2 * {10}^2 + 6 * {10}^1 +1 {10}^0 = (261)(10) Similarly, it can also be represented in a binary system. 261=256+4+1= 1 * 2^8 + 0 * 2^7 + 0 * 2^6 + 0 * 2^5 + 0 * 2^4 + 0 * 2^3 +1 * 2^2 + 0 * 2^1 + 1 * 2^0 = (100000101) (2). We can so represent any positive whole number in binary.

19 1-19 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Anything numeric… We can also represent sign (+/-) with one bit. Thus, if we always use 8 bits to represent a number, and use the first digit as the sign bit, then, 00000011 represents 3 and 10000011 represents -3. We can even represent all the fractions. 23.75 is 10111.11. Thus, every thing numeric can be represented with 0 and 1. 8-19

20 1-20 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-20 Hex explained Recall in Chapter 4, we specified custom colors in HTML using hex digits –e.g., –Hex is short for hexadecimal, base 16 Why use hex? Writing the sequence of bits is long, tedious, and error-prone. We thus group four bits together, which happens to be a value between 0 and 15, i.e., a digit in Hex.

21 1-21 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-21 The 16 Hex Digits 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F –A = 10, B = 11,..., F = 15 Sixteen values can be represented perfectly by 4-bit sequences (2 4 = 16) Changing hex digits to bits and back again: –Given a sequence of bits, group them in 4's and write the corresponding hex digit 0101 1100 5 C –Given hex, write the associated group of 4 bits

22 1-22 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-22 Hex (0-9,A-F) Decimal HexBinary 0 0 0000 1 1 0001 2 2 0010 3 3 0011 4 4 0100 5 5 0101 6 6 0100 7 7 0111 8 8 1000 9 9 1001 10 A 1010 11 B 1011 12 C 1100 13 D 1101 14 E 1110 15 F 1111

23 1-23 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-23 Now, it is text’s turn… Early binary representation—1 and 0—encoded numbers and keyboard characters Now representation for sound, video, and other types of information are also important For encoding text, what symbols should be included? –We want to keep the list small enough to use fewer bits, but we don't want to leave out critical characters Recall that to represent 2^n symbols, we have to use at least n digits.

24 1-24 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-24 Assigning symbols 26 uppercase and 26 lowercase Roman letters, 10 Arabic numerals, 10 arithmetic characters, 20 punctuation characters (including space), and 3 non-printable characters (new line, tab, backspace) = 95 characters, enough to represent English For 95 symbols, we need 7-bit sequences –2 6 = 642 7 = 128 Thus, we have to use at least 7 bits. A standard 7-bit code is ASCII(American Standard Code for Information Interchange)

25 1-25 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-25 Decimal ASCII Character Set Decimal - Character 0 NUL 1 SOH 2 STX 3 ETX 4 EOT 5 ENQ 6 ACK 7 BEL 8 BS 9 HT 10 NL 11 VT 12 NP 13 CR 14 SO 15 SI 16 DLE 17 DC1 18 DC2 19 DC3 20 DC4 21 NAK 22 SYN 23 ETB 24 CAN 25 EM 26 SUB 27 ESC 28 FS 29 GS 30 RS 31 US 32 SP 33 ! 34 " 35 # 36 $ 37 % 38 & 39 ' 40 ( 41 ) 42 * 43 + 44, 45 - 46. 47 / 48 0 49 1 50 2 51 3 52 4 53 5 54 6 55 7 56 8 57 9 58 : 59 ; 60 63 ? 64 @ 65 A 66 B 67 C 68 D 69 E 70 F 71 G 72 H 73 I 74 J 75 K 76 L 77 M 78 N 79 O 80 P 81 Q 82 R 83 S 84 T 85 U 86 V 87 W 88 X 89 Y 90 Z 91 [ 92 \ 93 ] 94 ^ 95 _ 96 ` 97 a 98 b 99 c 100 d 101 e 102 f 103 g 104 h 105 i 106 j 107 k 108 l 109 m 110 n 111 o 112 p 113 q 114 r 115 s 116 t 117 u 118 v 119 w 120 x 121 y 122 z 123 { 124 | 125 } 126 ~ 127 DEL

26 1-26 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-26 Hexadecimal ASCII Character Set Hexadecimal - Character 00 NUL 01 SOH 02 STX 03 ETX 04 EOT 05 ENQ 06 ACK 07 BEL 08 BS 09 HT 0A NL 0B VT 0C NP 0D CR 0E SO 0F SI 10 DLE 11 DC1 12 DC2 13 DC3 14 DC4 15 NAK 16 SYN 17 ETB 18 CAN 19 EM 1A SUB 1B ESC 1C FS 1D GS 1E RS 1F US 20 SP 21 ! 22 " 23 # 24 $ 25 % 26 & 27 ' 28 ( 29 ) 2A * 2B + 2C, 2D - 2E. 2F / 30 0 31 1 32 2 33 3 34 4 35 5 36 6 37 7 38 8 39 9 3A : 3B ; 3C 3F ? 40 @ 41 A 42 B 43 C 44 D 45 E 46 F 47 G 48 H 49 I 4A J 4B K 4C L 4D M 4E N 4F O 50 P 51 Q 52 R 53 S 54 T 55 U 56 V 57 W 58 X 59 Y 5A Z 5B [ 5C \ 5D ] 5E ^ 5F _ 60 ` 61 a 62 b 63 c 64 d 65 e 66 f 67 g 68 h 69 i 6A j 6B k 6C l 6D m 6E n 6F o 70 p 71 q 72 r 73 s 74 t 75 u 76 v 77 w 78 x 79 y 7A z 7B { 7C | 7D } 7E ~ 7F DEL

27 1-27 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-27 Extended ASCII: An 8-bit Code By the mid-1960's, it became clear that 7-bit ASCII was not enough to represent text from languages other than English IBM extended ASCII to 8 bits (256 symbols) Called "Extended ASCII," the first half is original ASCII with a 0 added at the beginning of each group of bits Handles most Western languages and additional useful symbols

28 1-28 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-28 Why "BYTE" Eight bits are grouped into a byte. Why is BYTE spelled with a Y? The Engineers at IBM were looking for a word for a quantity of memory between a bit and a word (usually 32 bits). Bite seemed appropriate, but they changed the i to a y, to minimize typing errors.

29 1-29 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-29

30 1-30 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-30 ASCII coding of phone numbers How would a computer represent in its memory, the phone number 888 555 1212? Encode each digit with its ASCII byte For example, the code for 8 is 00111000.

31 1-31 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-31 Unicode ACSII code, using 8 bits, represent 256 things. Several languages around the world have more than 256 individual characters In this Web age, we want to represent everything. Unicode uses 16 bits; 2 16 = 65,536 characters –1 st 7 bits (128 chars) are ASCII chars –Different locales – different characters beyond 1 st 7 bits

32 1-32 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Image We cut an image into a 2d matrix of pixels. The number of pixels is called resolution. The more pixels there are, or the higher the resolution is, the better the quality of the image. 10 megapixels refers 10 million pixel worth information is kept for that 3.5 inch image. 8-32

33 1-33 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-33 Digitizing Color RGB Colors: Binary Representation –Giving the intensities for the three constituent colors— red, green, blue—specifies color on monitor Color intensity is represented as a quantity (0 through 255) Binary Numbers Compared with Decimal Numbers –Number of digits is the base of numbering system –Binary is two digits: 0 and 1 –Decimal is 10 digits: 0 through 9 –Hexadecimal is 16 digits: 0 through 9, A through F

34 1-34 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-34 Place Value in a Decimal Number To find the quantity expressed by decimal number, the digit in a place is multiplied by the place value, and the results are added

35 1-35 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-35 Place Value in a Binary Number Works the same way except that the place values are successive powers of 2

36 1-36 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-36 Place Value in a Binary Number Given binary representation, we can find decimal equivalent value by multiplying the digit times the place value and adding the results

37 1-37 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-37 Converting a Binary Number to Decimal Add the decimal values for the places in the binary number with 1's

38 1-38 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-38 Black and White Colors A byte is allocated to each RGB intensity –The smallest intensity is 0000 0000 –The largest is 1111 1111 in binary This is 255 in decimal This is FF in hex Black (#000000) is no color; white (#FFFFFF) has full intensity for each RGB color

39 1-39 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Color revisited We use three bytes, about 16 million, to represent the color of every pixel, 8-39

40 1-40 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-40 Changing a Decimal Number to a Binary Number If the number being converted is smaller than the place value below it, copy the number into the next cell to its right; enter 0 as the binary digit. If the number being converted is equal to or larger than the place value below it, subtract the place value from the number and copy the result into the first cell of the next column; enter a 1 as the binary digit.

41 1-41 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-41 Lighten Up: Changing Color by Addition What color does this represent: 1100 1000 1100 1000 1100 1000 Each byte contains the decimal value 200. The color is RGB(200,200,200). –In HTML, write in hexadecimal #C8C8C8 –Equal amounts of red, green, and blue, closer to white than black (medium gray) –All colors with equal RGB values are black, white, or gray

42 1-42 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-42 To Increase Intensity: Add in Binary To make a lighter color of gray, change the common values to be closer to white (larger numbers) –For example, add 0001 0000 (decimal 16) to each color: 1101 1000 1101 1000 1101 1000RGB(216,216,216)

43 1-43 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-43 Lighter Still: Adding with Carry Digits Binary addition is similar to decimal addition –Work from right to left, adding corresponding digits in each place position –Sometimes we can add the two numbers and the result is expressed as a single digit (1+0=1) –Sometimes the sum cannot be expressed in one digit and we must carry to the next highest place (1+1=10, put down 0 and carry 1)

44 1-44 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-44

45 1-45 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-45

46 1-46 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-46

47 1-47 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-47

48 1-48 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-48 Overflow Because computers use fixed-size bit sequences, what happens when there are not enough bits to represent the correct result of a binary addition? Called overflow exceptions –Computers report them when the computation they're told to perform overflows; programmer has to find way to recover

49 1-49 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-49 Computing On Representations Changing the Colors of a Moon Photo –Imagine a scanned black and white photo of the moon –In the computer, the pixels of the photo form a long sequence of RGB triples. What values do they have? They are all black, white, or gray –Suppose you want a colorized version?

50 1-50 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-50 Removing the Smudge You have very dark gray values (28,28,28) from a smudge on the scanner's glass To remove the smudge and transform the pixels into the colors you remember seeing –Anything very close to black (first 2 digits are 00) can be changed to black (00xx xxxx) (0-63) –Algorithm for this is: Any three RGB bytes, each of whose first 2 bits are 00, are replaced with all zeros

51 1-51 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-51 Making the Moon Orange To shift color of moon to orange, change the white pixels: –Pick a shade of orange, say (255,213,132) –Change all the white pixels (255,255,255) to this shade –This will not change the gray of the craters To change Light Gray into Orange Tint: –Red byte: Leave unchanged –Green byte: reduce green slightly (subtract 42) –Blue byte: reduce blue significantly (subtract 123)

52 1-52 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-52 Boosting the Red You decide the gray parts of the moon need to be more luminous Boost the red Shifting the red in the orange pixels to 255 is too red –Split the difference. Add half the difference between the current value and pure red

53 1-53 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-53

54 1-54 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley More on sound Sound is a continuous wave. 8-54

55 1-55 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-55 Digitizing Sound An object creates sound by vibrating in a medium such as air –Vibrations push the air in all the directions –Pressure waves come to and vibrate our eardrumseardrums –The force, or the intensity of the push, determines the volume, or the amplitude, how loud it is. –The frequency, or the number of waves per second, determines the pitch, how does that sound.

56 1-56 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-56

57 1-57 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Two pieces: amplitude and pitch 8-57

58 1-58 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-58 Keep sound in computer To convert continuous information into discrete information, convert it to bits From zero line on graph, record with binary number the amount by which the wave is above or below it (positive or negative sound pressure) We can't record every position of the wave, since we only have finite amount of space

59 1-59 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-59 How to memorize frequency? Take measurements at regular intervals Number of samples in a second is the sampling rate –The faster the rate, the more accurate the recording

60 1-60 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Cut it into pieces: How many pieces? 8-60

61 1-61 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Depends on what we can hear We can hear somewhere between 20 Hz and 22,000 Hz. Nyquist theorem states that “to capture a sound of at most n Hz, you need to capture 2n samples per second. Thus, for each second, we need to capture 44,000 samples per second, as we have done for a commercial CD. 8-61

62 1-62 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-62 How to memorize amplitude? How accurate must the samples be? –Bits must represent both positive and negative values –The more bits, the more accurate the measurement –The digital representation of audio CDs uses 16 bits (records 65,536 levels, half above and half below the zero line)

63 1-63 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-63

64 1-64 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-64 The whole nine yards –Sound is picked up by a microphone (called a transducer) –The signal is fed into an analog-to-digital converter (ADC), which samples it at regular intervals and outputs binary numbers to memory –To play the sound, the process is reversed Numbers are read from memory into digital-to-analog converter (DAC), which creates an electrical wave by filling in between the digital values Electrical signal is output to speaker, which converts it to a sound wave

65 1-65 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-65

66 1-66 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-66 What to do with digital sound We can compute the representation MP3 Compression –One computation is to compress the digital audio (reduce number of bits needed) –Remove waves that are outside range of human hearing –MP3 usually gets a compression rate of 10:1 Lower bandwidth requirements, popular for Internet transmission Reproducing the Sound Recording –Bit file can be copied without losing any information –Original and copy are exactly the same

67 1-67 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-67 Too big to handle… It would take 6 minutes to display an 8” x 10” color image scanned at 300 pixels per inch (21.6 MB) with a 56kb/s modem How can we see screen-size pictures in second while surfing the web? Typical computer screen has under 100 pixels per inch –Storing picture digitized at 100 ppi saves a factor of 9 in memory (reducing resolution) This would still take too much time to send at 56kb/s –Solution: JPEG Compression scheme

68 1-68 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-68 JPEG Used for still images Our eyes are not very sensitive to small changes in hue (gradation of color), but are sensitive to small changes in brightness –Store a less accurate description of hue (fewer pixels) –Gets a 20:1 compression ratio without eyes being able to perceive the difference

69 1-69 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-69 An example –fax is a long sequence of 0's and 1's encoding where page is white or black. –Run length encoding is used to specify length of first sequence of 0's, following sequence of 1's, etc. –Yet another idea is to focus on the upper left, while overlooking the bottom right.

70 1-70 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley A trade-off Lossless compression—original representation can be perfectly reproduced JPG is a lossy representation in the sense that it does not store everything. To save space, it throws away some of the unnecessary information. To store 1 million 0, we simply keep “1 million 0” with about 10 bytes, instead of 125,000 bytes. 8-70

71 1-71 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-71

72 1-72 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-72 MPEG Compression Scheme Same idea as JPEG, applied to motion pictures JPEG-like compression is applied to each frame Then "interframe coherency" is used –MPEG only has to record and transmit the differences between one frame and the next –Results in huge amounts of compression –For example, when a person is walking….

73 1-73 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-73 Optical Character Recognition (OCR) Reading license plate to deduct toll from car's account What are the difficulties? –Computer must capture image of license plate but camera will see other highway images –Frame grabber recognizes when to snap image and send to computer for processing –Computer must figure out where in the image the plate is Scans groups of pixels looking for edges where color changes Looks for features Classifier matches features to letters of alphabet

74 1-74 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-74 Virtual Reality: Fooling the Senses Creating an entire digital world Applies to all senses and tries to eliminate the cues that keep us grounded in reality Haptic devices –Input/output technology for sense of touch and feel –Haptic glove enables computer to detect where our fingers are. When we bring our fingers close enough together, gloves stop their movement so we feel like we're holding something

75 1-75 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-75 The Challenge of Latency The challenge is for the system to operate fast and precisely enough to appear natural Latency is the time it takes for information to be delivered Too long latency period ruins the illusion –Absolute limit to how fast information can be transmitted—speed of light

76 1-76 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-76 The Challenge of Bandwidth How much information is transmitted per unit time Higher bandwidth usually means lower latency Four lane highway is faster, but costs a lot more Thus, always a compromise between cost and performance.

77 1-77 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8-77 Homework Multiple choice: even numbered Short answers: odd numbered Complete Exercises 6, 7, 8, 9, and 10


Download ppt "Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Introduction to Computers CS1100.01 Dr. Zhizhang Shen Chapter 8: How does."

Similar presentations


Ads by Google