Professional Documents
Culture Documents
Examples:
computers in a network sharing data data moving between primary and secondary memory two computers linked via a modem signals sent from Mars probe
103-3
Objectives
How does noise affect data transmission? What kind of error detection/correction schemes are there?
parity checks vertical redundancy (VRC) longitudinal redundancy (LRC) checksum ISBN UPC Hamming codes Hamming distance sparse code property
Noise
Signal + noise
0 1 0 1 1 0 1 1 1 0 0 1 0 0 0
103-5
Parity check
7-bit ASCII codes (128 codes, see Appendix H) 8-bit ASCII
parity bit: odd parity or even parity (convention) ASCII A (65)
odd parity
even parity
bit error
0 0 1 0
1 1 1 1
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 1
0 1 1 0
1 0 1 0
1 1 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 1 0 103-8
1 0 0 0 0 1 0 0
even parity: always the same either way (not so with odd parity)
? 1 1 1 1 0 1 1
Checksum
Block of characters Add up their values Divide by 256, take remainder (one byte) Append to block
1. 2. 3. 128. A A A A
0 0 0 0
1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 0 1
checksum
1 0 0 0 0 0 0 0
ISBN
Why do 10% of books have ISBNs ending in X?
Bronson: ISBN 0-534-36801-8
10 9 8 7 6 5 4 3 2 remainder on division by 11 if 0, then 0 else subtract from 11 if the result is 10, use X 179 3 8
103-10
guard bars
0 1 2 3 4 5
6 7 8 9 0 5
103-11
UPC checksum
0 1 2 3 4 5 6 7 8 9 0 5
odd sum 20 3
even sum 25
85
10 (85 % 10) = 5
103-12
Hamming codes
Error correction: transmit everything 3 times!
101
111
103-13
Codes
3 bits
Redundancy
3 A B A B C D 000 111 00000 11100 ? ?
4 letters (2 bits)
5 bits
2.5
7 bits 12 bits
1.75 1.5
103-15
32 bit codes
Transmit 6 copies of each 5-bit pixel 6 5 = 30 bits Majority vote Can only correct 2 errors!
103-17
30 31
5 01011010010110100101101001011010
103-18
Receiver:
1. Receive the packet 2. Check for errors 3. If no error, send ACK (ASCII 6) else send NAK (ASCII 21) 1. If receive NAK, resend the packet 2. If receive ACK, send next packet 3. If receive anything else, ignore it
Sender:
What if NAK gets corrupted or lost? (time out and re-send) or ACK? (number packets) or sender and receiver lose sync? (number ACKs) or lockstep sync causes too much delay? (several un-ACKd packets) 103-19 or you need a bidirectional channel? (ha!study computer science)
Richard Hamming
Born: 11 Feb 1915 in Chicago, Illinois, USA Died: 7 Jan 1998 in Monterey, California, USA
Richard Hamming earned the Ph.D. at the University of Illinois in 1942, then joined the Manhattan Project in New Mexico. There, he learned how to operate the Projects computers and helped physicists complete calculations necessary for the design of the atomic bomb. After the war, Hamming joined other young mathematicians at Bell Telephone Laboratories. He continued his work with computers. Frustrated by the unreliability of early machines, he devised a method for the detection and correction of errors in digital data. After leaving Bell Labs, he built a second career as a teacher and author of textbooks at the Naval Postgraduate School. He spoke highly of his students. He believed that invention and discovery would quickly outdate the factual content of his courses and so gave priority to helping his students learn how to learn. He liked to quote Louis Pasteur, saying that luck favors the prepared mind. Richard Hamming died on January 7, 1998 at the age of 82 years. He is survived by Wanda, his wife of 55 years who also contributed to the Manhattan Project at 103-20 Los Alamos, New Mexico.
Questions
1. Whats forward error correction? What is the other kind of error correction? 2. Whats the difference between even parity and odd parity? 3. Whats the difference between vertical redundancy checking and longitudinal redundancy checking? 4. If you use a vertical redundancy check together with a longitudinal redundancy check, how many bit errors can be corrected? How many can be detected? 5. How do you compute the checksum of a message? 6. Devise a 3-bit code for a 2-letter alphabet that corrects all 1-bit errors. 7. Devise a 5-bit code for a 4-letter alphabet that corrects all 1-bit errors. 8. What is the basic idea of error correction by protocol? 9. Whats an ACK? Whats a NACK? 10. Why do error correction protocols usually number the packets?
103-21
10