Download Error Detection and Correction Techniques in Digital Communications and more Slides Computer Networks in PDF only on Docsity!
2
Error Detection and Correction
- Possible binary voltage encoding symbol
- Neighborhoods and erasure region
voltage
? (erasure)
- Possible QAM symbol
- Neighborhoods in green
- All other space results in erasure Input to digital level: valid symbols or erasures
4
Error Detection: How?
- We want only k redundant bits for an
n-bit message, where k < < n
- In Ethernet, 32-bit CRC for 12,000 bits (1500 bytes)
- k bits are derived from the original
message
- Both the sender and receiver know the
algorithm
5
1-bit Error Detection with Parity
- Every code has even number of 1’s
Valid Codes Parity encoding: gray dots are invalid and indicate errors
If only 1 bit flips, it can be detected
7
2-bit Erasure Correction With Voting
- Every code is copied three times
Remaining bit in a 2-erasure plane is not ambiguous
Cannot correct 1-error and 1-erasure
8
Hamming Distance (1950 Paper)
- Minimum number of bit flips between
code words
- 2 flips for parity
- 3 flips for voting
- n-bit error detection
- No code word changed into another code word
- Requires Hamming distance of n+
10
Hamming Codes (1950 Paper)
- Construction for 1-bit error-correcting codes
- Minimal number of check bits required
- Construction
- Number of bits from 1 upward
- Powers of 2 are check bits
- All others are data bits
- Check bit j is XOR of all bits k such that (j
AND k) = j
- – Example: 4 bits of data, 3 check bits Docsity.com
11
Error Bits or Error Burst
- Common model of errors
- Probability of error per bit
- Error in each bit independent of others
- Value of incorrect bit independent of others
- Burst model
- Probability of back-to-back bit errors
- Error probability dependent on adjacent bits
- Value of errors may have structure
- Why assume bursts?
- Appropriate for some media (e.g ., Radio)
- Faster signaling rate enhances such phenomena
13
Two-Dimensional Parity
- Adding one extra bit to a 7- bit code to balance 1s
- Extra parity byte for the entire frame
- Catches all 1, 2 and 3 bit errors and most 4-bit errors
- 14 redundant bits for a 42- bit message, in the example
1011110 1
1101001 0
(^0101001 )
1011111 0
0110100 1
0001110 1
1111011 0
Parity bits
Parity byte
Data
14
Two-Dimensional Parity
16
Internet Checksum Algorithm
View message as a sequence of 16-bit integers; sum using 16-bit ones-complement arithmetic ; take ones-complement of the result.
**u_short cksum(u_short buf, int count) { register u_long sum = 0; while (count--) { sum += buf++; if (sum & 0xFFFF0000) { / carry occurred, so wrap around / sum &= 0xFFFF; sum++; } } return ~(sum & 0xFFFF); }
17
Cyclic Redundancy Check
Theory
- Based on finite-field (binary-valued)
arithmetic
- Bit string represented as polynomial
- Coefficients are binary-valued
- Divide bit string polynomial by generator
polynomial to generate CRC
Practice
- Bitwise XOR’s Docsity.com
19
Cyclic Redundancy Check
- Transmit polynomial P ( x ) that is evenly divisible
by C ( x )
- Shift left k bits, i.e., M ( x ) xk
- Add remainder of M ( x ) xk^ / C ( x ) into M ( x ) xk
- Receiver receives polynomial P ( x ) + E ( x )
- E ( x ) = 0 implies no errors
- Receiver divides ( P ( x ) + E ( x )) by C ( x ); remainder
will be zero ONLY if:
- E ( x ) was zero (no error), or
- E ( x ) is exactly divisible by C ( x )
20
CRC Example - Sender
- C(x) = x 3 +x 2 +1 = 1101 generator
- M(x) = x 8 + x 6 + x 5 + x 4 +1 = 101110001 message
101 Remainder