1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits...
-
Upload
kristina-riley -
Category
Documents
-
view
227 -
download
5
Transcript of 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits...
![Page 1: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/1.jpg)
1
Block Coding
Messages are made up of k bits.
Transmitted packets have n bits, n > k:k-data bits and r-redundant bits.
n = k + r
![Page 2: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/2.jpg)
2
Modulo-2 Arithmetic
Addition and subtraction are described by the logical exclusive-or operation.
![Page 3: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/3.jpg)
3
Modulo-2 Arithmetic (logical xor)
![Page 4: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/4.jpg)
4
Chapter 10
Error Detection and
Correction
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
![Page 5: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/5.jpg)
Interference
Example causes of interference:HeatNoise due to interference (EM fields)AttenuationDistortion
Interference causes bit errors.
![Page 6: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/6.jpg)
Bit Error Classifications
Single bit error
Burst error
![Page 7: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/7.jpg)
Single Bit Error
Single bit errorA one is interpreted as a zero (or vice-versa)Refers to only one bit modified in a specified
transmission unit of dataAn uncommon type of error for serial data due to
the duration of a bit being much less than the duration of interference.
![Page 8: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/8.jpg)
8
Figure 10.1 Single-bit error
![Page 9: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/9.jpg)
9
Burst Error
More than one bit is damaged by interference.
![Page 10: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/10.jpg)
10
Figure 10.2 Burst error of length 8
![Page 11: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/11.jpg)
11
Error Detection
Detection of errors is necessary to determine if data should be rejected.
Possible responses to error detection include:Retransmission request Forward error correction (corrected on the receiving
end)Forward correction saves bandwidth & time
![Page 12: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/12.jpg)
12
Redundancy
Extra bits can be included with the data transmission to assist in the detection and correction of errors
– For digital transmissions that implies using block-coding
![Page 13: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/13.jpg)
13
Redundant Bits
![Page 14: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/14.jpg)
14
Detection vs Correction
Detection is easier than correction
![Page 15: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/15.jpg)
15
Data Coding Schemes
Block coding – described in this course
or
– Convolution coding – this is covered in advanced Math or EE signal processing courses.
![Page 16: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/16.jpg)
16
Block Coding
Data-words are made up of k bits.
Codewords are made up of k data bits (a data-word) and r redundant bits.
n = k + r
Where n is the number of bits in a codeword
![Page 17: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/17.jpg)
17
Figure 10.5 Datawords and codewords in block coding
![Page 18: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/18.jpg)
18
Examples
No block coding for 10base-T Ethernet, Manchester coding.
4B/5B block coding (Fast Ethernet), 8B6T or MLT-3 line coding.
8B/10B block coding (Gigabit Ethernet), PAM-5 line coding.
![Page 19: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/19.jpg)
19
![Page 20: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/20.jpg)
20
Error Detection With Block Coding
• The receiver can detect an error if
– The receiver has a list of valid code words
– A received codeword is not a valid code word
![Page 21: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/21.jpg)
21
Table 10.2 A code for error correction (Example 10.3)
![Page 22: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/22.jpg)
22
Possible Transmission Outcomes
• A codeword is sent and received without incident
• A codeword is sent but is modified in transmission. The error is detected if the codeword is not in the valid codeword list.
• A codeword is sent but is modified in transmission. The error is not detected if the resulting new codeword is in the list of valid codewords.
![Page 23: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/23.jpg)
23
Error-Detecting Code
• Error detecting code can only detect the types of errors it was designed to detect. Other types of errors may go undetected.
![Page 24: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/24.jpg)
24
The Hamming Distance
• The Hamming Distance, d(x,y), between two words of the same size is the number of differences between corresponding bits.
• Examples
d(000,011) = 2
d(10101,11110) = 3
![Page 25: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/25.jpg)
25
Let us find the Hamming distance between two pairs of words.
1. The Hamming distance d(000, 011) is 2 because
Example 10.4
2. The Hamming distance d(10101, 11110) is 3 because
![Page 26: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/26.jpg)
26
The minimum Hamming distance is the smallest Hamming distance between all possible pairs in a set of words.
Note
![Page 27: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/27.jpg)
10.27
Table 10.1 A code for error detection (Example 10.2)
![Page 28: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/28.jpg)
28
Find the minimum Hamming distance of the coding scheme in Table 10.1.
SolutionWe first find all Hamming distances.
Example 10.5
The dmin in this case is 2.
![Page 29: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/29.jpg)
29
Table 10.2 A code for error correction (Example 10.3)
![Page 30: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/30.jpg)
30
Find the minimum Hamming distance of the coding scheme in Table 10.2.
SolutionWe first find all the Hamming distances.
The dmin in this case is 3.
Example 10.6
![Page 31: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/31.jpg)
31
To guarantee the detection of up to s errors in all cases, the minimum
Hamming distance in a block code must be dmin = s + 1.
Note
![Page 32: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/32.jpg)
32
Hamming Code Notation
What is the maximum number of detectable errors for each of the two previous coding schemes?
– d-min = 2, s =
– d-min = 3, s =
![Page 33: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/33.jpg)
33
Figure 10.8 Geometric concept for finding dmin in error detection
![Page 34: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/34.jpg)
34
To guarantee correction of up to t errors in all cases, the minimum Hamming distance in
a block code must be dmin = 2t + 1.
Note
![Page 35: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/35.jpg)
35
Figure 10.9 Geometric concept for finding dmin in error correction
![Page 36: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/36.jpg)
How many errors can be corrected for the two example coding schemes:
d-min = 2, t =
d-min = 3, t =
![Page 37: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/37.jpg)
37
To guarantee correction of up to t errors in all cases, the minimum Hamming distance in
a block code must be dmin = 2t + 1.
Note
![Page 38: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/38.jpg)
38
Example
• A code scheme has dmin = 5.
– What is the maximum number of detectable errors?
– What is the maximum number of correctable errors?
![Page 39: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/39.jpg)
39
Linear Block Codes
• A linear block code is a code where the logical exclusive-or of any two valid codewords creates another valid codeword.
![Page 40: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/40.jpg)
40
Linear Block Codes
• The min Hamming distance for a LBC is the minimum number of ones in a non-zero valid codeword.
![Page 41: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/41.jpg)
Exercise:
For each of the next two examples,
Compute the • Hamming distance,
• the number of detectable errors,
• number of correctable errors
• Show that the code is linear
![Page 42: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/42.jpg)
42
Table 10.1 A code for error detection C(3,2)
![Page 43: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/43.jpg)
43
Table 10.2 A code for error correction C(5,2)
![Page 44: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/44.jpg)
44
Parity Check
• Count the number of ones in a data word.
• If the count is odd, the redundant bit is one
• If the count is even, the redundant bit is zero
![Page 45: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/45.jpg)
45
A simple parity-check code is a single-bit error-detecting
code in which n = k + 1 with dmin = 2.
Note
![Page 46: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/46.jpg)
46
A simple parity-check code can detect an odd number of errors.
Note
![Page 47: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/47.jpg)
47
Table 10.3 Simple parity-check code C(5, 4)
![Page 48: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/48.jpg)
48
How Useful is a Parity Check?
• Detecting any odd number of errors is pretty good, can we do better?
![Page 49: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/49.jpg)
49
2-Dimensional Parity Check
• It is possible to create a 2-D parity check code that detects and corrects errors.
![Page 50: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/50.jpg)
50
Figure 10.11 Two-dimensional parity-check code
![Page 51: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/51.jpg)
51
Figure 10.11 Two-dimensional parity-check code
![Page 52: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/52.jpg)
52
Figure 10.11 Two-dimensional parity-check code
![Page 53: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/53.jpg)
53
Figure 10.11 Two-dimensional parity-check code
![Page 54: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/54.jpg)
Interleaving
● By interleaving the columns into slots, it becomes possible to
● detect up to n-row errors.● The example is 70%efficient. The efficiency can
be improved by adding more rows.
![Page 55: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/55.jpg)
55
Cyclic Codes
• If a codeword is shifted cyclically, the result is another codeword.
– (highest order bit becomes the lowest order bit)
– Cyclic codes are linear codes
![Page 56: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/56.jpg)
C(7,4)
Assume d-min = 3.
Answer the following about table 10.6:
● What is the codeword size?● What is the data-word size?
![Page 57: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/57.jpg)
57
Table 10.6 is this C(7, 4) cyclic?
![Page 58: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/58.jpg)
C(7,4)
Is the table 10.6 code cyclic?
Is it linear?
What is d-min?
How many detectible errors?
How many correctible errors?
![Page 59: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/59.jpg)
Hamming Codes
d-min >= 3
Minimum number of detectable errors: 2
Minimum number of correctable errors: 1
For C(n,k), • n = 2^r – 1
• r = n – k (number of redundant bits)
• r >= 3 (author uses m = r)
![Page 60: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/60.jpg)
Which are Hamming Codes?
C(7,4)
C(7,3)
![Page 61: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/61.jpg)
Error Correction
1. Using CRC codes computing bit syndromes
2. Using interleaving with multiplexing.
– Use a parity bit in each frame
– Check for invalid code words
(see example exercises)
![Page 62: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/62.jpg)
62
Checksum
• Adding the codewords together at the source and destination.
• If the sum at the source and destination match, there is a good chance that no errors occurred.
• Checksums are not as reliable as the CRC.
![Page 63: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/63.jpg)
63
Checksum Examples
• 1's complement
• 16 bit checksum used by the Internet
![Page 64: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/64.jpg)
Sender: Checksum Calculation
1. Divide into 16 bit unsigned words
2. Add the 16 bit words using 1’s complement addition.
3. Complement the total
4. Send all the above words.
![Page 65: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/65.jpg)
Receiver: Checksum Calculation
1. Divide into 16 bit words
1.Add the 16 bit words and the checksum value using 1’s complement arithmetic.
2.The complement of the total should be zero.
![Page 66: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/66.jpg)
Example: Sender
0x466f
0x726f
0x757a
+_______
0x12e58 partial sum
0x2e59 sum
0xd1a6 complement
![Page 67: 1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.](https://reader036.fdocuments.us/reader036/viewer/2022062300/56649db95503460f94aa9478/html5/thumbnails/67.jpg)
Example: Receiver
0x466f
0x726f
0x757a
0xd1a6 (sender’s checksum)
+_______
0x1fffe (partial sum)
0xffff (sum)
0x0000 (complement)