Error detection and Correction
control
18-09-2024 G. V.Vidya Lakshmi 1
Error Detection
• Networks must be able to transfer data from one device to another with
complete accuracy.
• Data can be corrupted during transmission.
• For reliable communication, errors must be detected and corrected.
• Error detection and correction are implemented either at the
data link layer or the transport layer.
• How to detect errors
• If only data is transmitted, errors cannot be detected.
• Send more information with data that satisfies a special relationship.
• Add redundancy.
Types of Errors
• Single Bit Error
• Burst Error
Single-bit error
• Single bit errors are the least likely type of errors in serial data
transmission because the noise must have a very short duration which
is very rare.
• Example:
★ If data is sent at 1Mbps then each bit lasts only 1/1,000,000 sec. or 1
μs.
★ For a single-bit error to occur, the noise must have a duration of only 1
μs, which is very rare.
The term burst error means that two or more bits in the data unit
have changed from 1 to 0 or from 0 to 1.
Burst errors does not necessarily mean that the errors occur in
consecutive bits, the length of the burst is measured from the first
corrupted bit to the last corrupted bit. Some bits in between may
not have been corrupted.
Burst error
• The length of the burst is measured from the first corrupted bit to the last corrupted
bit.
• Some bits in between may not have been corrupted.
★ Burst error is most likely to happen in serial transmission since the
duration of noise is normally longer than the duration of a bit.
★ The number of bits affected depends on the data rate and duration of
noise.
Example:
If data is sent at rate = 1Kbps then a noise of 1/100 sec can affect 10
bits.(1/100*1000)
If same data is sent at rate = 1Mbps then a noise of 1/100 sec can
affect 10,000 bits.(1/100*106
)
18-09-2024 G. V.Vidya Lakshmi 10
Error and types of errors
Error is a condition when the receiver’s information does not match the sender’s.
Single bit error Mult-bit error Burst error
Error control
• How to make sure all frames are eventually delivered to the network layer
at the destination and in the proper order.
• Assume for the moment that the receiver can tell whether a frame that it
receives contains correct or faulty information (using error detection and
correction techniques)
• The usual way to ensure reliable delivery is to provide the sender with
some feedback about what is happening at the other end of the line.
18-09-2024 G. V.Vidya Lakshmi 11
Error control
• Typically, the protocol calls for the receiver to send back special control
frames bearing positive or negative acknowledgements about the
incoming frames.
• If the sender receives a positive acknowledgement about a frame, it
knows the frame has arrived safely.
• On the other hand, a negative acknowledgement means that something
has gone wrong and the frame must be retransmitted again.
18-09-2024 G. V.Vidya Lakshmi 12
Redundancy
• The central concept in detecting or correcting errors is redundancy.
• To be able to detect or correct errors, we need to send some extra bits
with our data.
• These redundant bits are added by the sender and removed by the
receiver.
• Their presence allows the receiver to detect or correct corrupted bits.
18-09-2024 G. V.Vidya Lakshmi 13
Error detection and correction methods
This session will give the knowledge about
• Error detection
1. Parity check
• VRC
• LRC
• 2D parity check
3.Cyclic redundancy Check(CRC)
4. Checksum
• Error Correction
1. Hamming code
18-09-2024 G. V.Vidya Lakshmi 14
Error detection
18-09-2024 G. V.Vidya Lakshmi 15
Parity Check
The most common and least expensive. It can be Simple or Two
Dimensional.
How does it work?
• A k-bit dataword is changed to an n-bit codeword where n = k + 1.
• The extra bit, called the parity bit, is selected to make the total number of
1s in the codeword even
• Note : there is either even parity or odd parity.
18-09-2024 G. V.Vidya Lakshmi 16
Parity Check
Example:
• Assume the sender sends the dataword 1011. Since the number of 1's is
odd then the parity bit is equal to 1 and the codeword for this dataword is
10111.
• Simple parity check can detect all single-bit errors. It can detect burst
errors only if the total number of errors in each data unit is odd.
• A better approach is the two-dimensional parity check which organizes
the data units into table (rows and columns). The parity bit for each
column is Calculated and added to the table as a new row (column parity)
18-09-2024 G. V.Vidya Lakshmi 17
• Vertical Redundancy Check (VRC)
– Append a single bit at the end of data block based on Even parity or
odd parity
• Even Parity : Count the occurrence of 1 in the given data
0110011 00110011 (If number of 1’s are Even)
0110001 10110001 (If number of 1’s are odd)
• Odd Parity : Count the occurrence of 1 in the given data
0110011 10110011 (If number of 1’s are Even)
0110001 00110001 (If number of 1’s are odd)
It can detect single bit error
It can detect burst errors only if the total
number of errors is odd.
Longitudinal Redundancy Check
LRC
11100111 11011101 00111001 10101001
11100111
11011101
00111001
10101001
10101010
11100111 11011101 00111001 10101001
10101010
Original Data LRC
Performance
LRC increases the likelihood of detecting
burst errors.
If two bits in exactly the same positions in
another data unit are damaged, then the
LRC checker will not detect an error.
VRC and LRC
Two-dimensional parity check
18-09-2024 G. V.Vidya Lakshmi 22
Cyclic Redundancy Check
• In a cyclic code, if a codeword is cyclically shifted (rotated), the result is
another codeword.
• Example:
• if 1011000 is a codeword and we cyclically left-shift, then 0110001 is also
a codeword.
18-09-2024 G. V.Vidya Lakshmi 23
Cyclic Redundancy Check
18-09-2024 G. V.Vidya Lakshmi 24
The Process of CRC: At the Sender
• The encoder or the dataword has k bits (4 here).The codeword
(polynomial) has n bits ( 7).
• The size of the dataword is augmented by adding n-k (3 here) 0s to the
right-hand size of the word.
• The generator uses a divisor (using CRC Polynomical x3
+x+1) of size
n-k+1 (4 here), predefined and agreed upon.
• The generator divides the augmented dataword by the divisor ( modulo-2
division).
• The reminder is appended to the dataword to create the codeword.
18-09-2024 G. V.Vidya Lakshmi 25
The Process of CRC: At the Receiver
• The decoder does the same division process as the encoder.
• The reminder of the division is the syndrome.
• If the syndrome is all 0s, there is no error, the dataword separated from the
received codeword and accepted.
• Otherwise, everything is discarded.
18-09-2024 G. V.Vidya Lakshmi 26
Division in CRC encoder
18-09-2024 G. V.Vidya Lakshmi 27
Division in the CRC decoder for two cases
18-09-2024 G. V.Vidya Lakshmi 28
Checksum
• Checksum is an error-detecting technique that can be applied to a
message of any length. Like CRC, checksum based on the concept of
redundancy.
18-09-2024 G. V.Vidya Lakshmi 29
Checksum Example
• Suppose the message is a list of five 4-bit numbers that we want to send to
a destination.
• In addition to sending these numbers, we send the sum of the numbers.
• For example, A sender wants to send the set of numbers (7, 11, 12, 0, 6)
the process will be as follow:
1. Sum up the numbers = 7+11+12+0+6 = 36
18-09-2024 G. V.Vidya Lakshmi 30
Checksum Example
2. Then convert the decimal number 36 in binary = (100100)2
.
3. To change it to a 4-bit number ( as the sending numbers) we add the extra
leftmost bit to the right four bits as shown below. This is called sum in
one’s complement .
18-09-2024 G. V.Vidya Lakshmi 31
Checksum Example
4. Then complements the result to get the checksum.
6 = ( 0110)2
,
5. The complement of 6 = 15 - 6 = 9
Or (1001)2
= 9 = (1001)2
6. The sender sends the five data numbers and the checksum
(7, 11, 12, 0, 6, 9).
• If there is no corruption in transmission, the receiver receives (7, 11, 12, 0,
6, 9) and adds them in one’s complement to get 15.
18-09-2024 G. V.Vidya Lakshmi 32
Checksum Example
18-09-2024 G. V.Vidya Lakshmi 33
Error Correcting code: Hamming code
• Hamming code is a set of error-correction codes that can be used to detect
and correct the errors that can occur when the data is moved or stored
from the sender to the receiver. It is technique developed by R.W.
Hamming for error correction.
• Redundant Bits: Redundant bits are extra binary bits that are generated
and added to the information-carrying bits of data transfer to ensure that no
bits were lost during the data transfer.
• The redundancy bits are placed at certain calculated positions to eliminate
the errors and the distance between the two redundancy bits is called
"Hamming Distance".
18-09-2024 G. V.Vidya Lakshmi 34
Error Correcting code: Hamming code
• This is the relationship between data bits and redundancy bits to correct a
single-bit error. A-frame consists of M data bits and P redundant bits.
Suppose the total length of the frame be N (N=M+P). An N-bit unit
containing data and the check bit is often referred to as an N-bit codeword.
• The following formula is used to find the number of redundant bits.
• Number of single-bit errors = M + P and Number of states for no error = 1
• So, the number of redundant bits (P) that represent all states (M+P+1)
must satisfy − 2P
≥ 𝑀 + P + 1
• where P = Redundant bit, and M = data bit.
18-09-2024 G. V.Vidya Lakshmi 35
Parity bits
• Even parity bit: In the case of even parity, for a given set of bits, the
number of 1’s are counted. If that count is odd, the parity bit value is set to
1, making the total count of occurrences of 1’s an even number. If the total
number of 1’s in a given set of bits is already even, the parity bit’s value is
0.
• Odd Parity bit: In the case of odd parity, for a given set of bits, the number
of 1’s are counted. If that count is even, the parity bit value is set to 1,
making the total count of occurrences of 1’s an odd number. If the total
number of 1’s in a given set of bits is already odd, the parity bit’s value is 0.
18-09-2024 G. V.Vidya Lakshmi 36
Error Correction- Hamming Code
18-09-2024 G. V.Vidya Lakshmi 37
A Layout of Data and Check Bits that Achieves Our
Design Criteria:
18-09-2024 G. V.Vidya Lakshmi 38
Bit position 11 10 9 8 7 6 5 4 3 2 1
Bit number 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001
Data bit D7 D6 D5 D4 D3 D2 D1
Redundancy bit r8 r4 r2 r1
Hamming Code
18-09-2024 G. V.Vidya Lakshmi 39
r1 is a parity check on every data bit whose position is xxx1
r2 is a parity check on every data bit whose position is xx1x
Hamming Code
18-09-2024 G. V.Vidya Lakshmi 40
r1 is a parity check on every data bit whose position is xxx1
r2 is a parity check on every data bit whose position is xx1x
Hamming Code
18-09-2024 G. V.Vidya Lakshmi 41
r4 is a parity check on every data bit whose position is x1xx
r8 is a parity check on every data bit whose position is 1xxx
Hamming Code
18-09-2024 G. V.Vidya Lakshmi 42
Algorithm of Hamming code
• Step 1 − First write the bit positions starting from 1 in a binary form (00, 10,
11,100, etc.)
• Step 2 − Mark all the bit positions that are powers of two as parity bits (1,
2, 4, 8, 16, 32, 64, etc.)
• Step 3 − All other bit positions are for the data to be encoded using (3, 5, 6,
7, 9, 10 and 11, etc.)
18-09-2024 G. V.Vidya Lakshmi 43
Finding Parity bit
• Position 1 − Check 1 bit, then skip 1 bit, check 1 bit and then skip 1 bit and so on (Ex
− 1,3,5,7,11, etc.)
• Position 2 − Check 2 bit, then skip 2 bit, check 2 bit, then skip 2 bit (Ex −
2,3,6,7,10,11,14,15, etc.)
• Position 4 − Check 4 bit, then skip 4 bit, check 4 bit, then skip 4 bit (Ex − 4, 5, 6, 7,
12, 13, 14, 15, etc.)
• Position 8 − Check 8 bit, then skip 8 bit, check 8 bit, then skip 8 bit (Ex − 8, 9, 10, 11,
12, 13, 14, 15, 24, 25, 26, 27, 28, 29, 30, 31).
• Set the parity bit 1 if the total number of 1s in the positions it checks odd or set the
parity bit 0 if the total number of 1s in the positions it checks even.
18-09-2024 G. V.Vidya Lakshmi 44
Example of Hamming Code
18-09-2024 G. V.Vidya Lakshmi 45
Single-bit error
18-09-2024 G. V.Vidya Lakshmi 46
Hamming Code Syndrome Design Criteria
For convenience, we would like to generate a 4-bit hamming code for 8-bit
dataword with the following characteristics:
• If the syndrome contains all 0’s, no error has been detected.
• If the syndrome contains one and only bit set to 1, then an error has
occurred in one of the 4 check bits. No correction is needed.
• If the syndrome contains more than one bit set to 1, then the numerical
value of the syndrome indicates the position of the data bit in error. This
data bit is inverted for correction.
18-09-2024 G. V.Vidya Lakshmi 47
Error Detection
18-09-2024 G. V.Vidya Lakshmi 48
Example-1
• Generate hamming code for the data word 1110
• Generate hamming code for the dataword 1011001
18-09-2024 G. V.Vidya Lakshmi 49
Burst Error Correction- with Hamming
code

1.4.pdf 1.4.pdf 1.4.pdf1.4.pdf1.4.pdf1.4.pdf

  • 1.
    Error detection andCorrection control 18-09-2024 G. V.Vidya Lakshmi 1
  • 2.
    Error Detection • Networksmust be able to transfer data from one device to another with complete accuracy. • Data can be corrupted during transmission. • For reliable communication, errors must be detected and corrected. • Error detection and correction are implemented either at the data link layer or the transport layer. • How to detect errors • If only data is transmitted, errors cannot be detected. • Send more information with data that satisfies a special relationship. • Add redundancy.
  • 3.
    Types of Errors •Single Bit Error • Burst Error
  • 4.
  • 5.
    • Single biterrors are the least likely type of errors in serial data transmission because the noise must have a very short duration which is very rare. • Example: ★ If data is sent at 1Mbps then each bit lasts only 1/1,000,000 sec. or 1 μs. ★ For a single-bit error to occur, the noise must have a duration of only 1 μs, which is very rare.
  • 6.
    The term bursterror means that two or more bits in the data unit have changed from 1 to 0 or from 0 to 1. Burst errors does not necessarily mean that the errors occur in consecutive bits, the length of the burst is measured from the first corrupted bit to the last corrupted bit. Some bits in between may not have been corrupted.
  • 7.
  • 8.
    • The lengthof the burst is measured from the first corrupted bit to the last corrupted bit. • Some bits in between may not have been corrupted.
  • 9.
    ★ Burst erroris most likely to happen in serial transmission since the duration of noise is normally longer than the duration of a bit. ★ The number of bits affected depends on the data rate and duration of noise. Example: If data is sent at rate = 1Kbps then a noise of 1/100 sec can affect 10 bits.(1/100*1000) If same data is sent at rate = 1Mbps then a noise of 1/100 sec can affect 10,000 bits.(1/100*106 )
  • 10.
    18-09-2024 G. V.VidyaLakshmi 10 Error and types of errors Error is a condition when the receiver’s information does not match the sender’s. Single bit error Mult-bit error Burst error
  • 11.
    Error control • Howto make sure all frames are eventually delivered to the network layer at the destination and in the proper order. • Assume for the moment that the receiver can tell whether a frame that it receives contains correct or faulty information (using error detection and correction techniques) • The usual way to ensure reliable delivery is to provide the sender with some feedback about what is happening at the other end of the line. 18-09-2024 G. V.Vidya Lakshmi 11
  • 12.
    Error control • Typically,the protocol calls for the receiver to send back special control frames bearing positive or negative acknowledgements about the incoming frames. • If the sender receives a positive acknowledgement about a frame, it knows the frame has arrived safely. • On the other hand, a negative acknowledgement means that something has gone wrong and the frame must be retransmitted again. 18-09-2024 G. V.Vidya Lakshmi 12
  • 13.
    Redundancy • The centralconcept in detecting or correcting errors is redundancy. • To be able to detect or correct errors, we need to send some extra bits with our data. • These redundant bits are added by the sender and removed by the receiver. • Their presence allows the receiver to detect or correct corrupted bits. 18-09-2024 G. V.Vidya Lakshmi 13
  • 14.
    Error detection andcorrection methods This session will give the knowledge about • Error detection 1. Parity check • VRC • LRC • 2D parity check 3.Cyclic redundancy Check(CRC) 4. Checksum • Error Correction 1. Hamming code 18-09-2024 G. V.Vidya Lakshmi 14
  • 15.
  • 16.
    Parity Check The mostcommon and least expensive. It can be Simple or Two Dimensional. How does it work? • A k-bit dataword is changed to an n-bit codeword where n = k + 1. • The extra bit, called the parity bit, is selected to make the total number of 1s in the codeword even • Note : there is either even parity or odd parity. 18-09-2024 G. V.Vidya Lakshmi 16
  • 17.
    Parity Check Example: • Assumethe sender sends the dataword 1011. Since the number of 1's is odd then the parity bit is equal to 1 and the codeword for this dataword is 10111. • Simple parity check can detect all single-bit errors. It can detect burst errors only if the total number of errors in each data unit is odd. • A better approach is the two-dimensional parity check which organizes the data units into table (rows and columns). The parity bit for each column is Calculated and added to the table as a new row (column parity) 18-09-2024 G. V.Vidya Lakshmi 17
  • 18.
    • Vertical RedundancyCheck (VRC) – Append a single bit at the end of data block based on Even parity or odd parity • Even Parity : Count the occurrence of 1 in the given data 0110011 00110011 (If number of 1’s are Even) 0110001 10110001 (If number of 1’s are odd) • Odd Parity : Count the occurrence of 1 in the given data 0110011 10110011 (If number of 1’s are Even) 0110001 00110001 (If number of 1’s are odd) It can detect single bit error It can detect burst errors only if the total number of errors is odd.
  • 19.
    Longitudinal Redundancy Check LRC 1110011111011101 00111001 10101001 11100111 11011101 00111001 10101001 10101010 11100111 11011101 00111001 10101001 10101010 Original Data LRC
  • 20.
    Performance LRC increases thelikelihood of detecting burst errors. If two bits in exactly the same positions in another data unit are damaged, then the LRC checker will not detect an error.
  • 21.
  • 22.
  • 23.
    Cyclic Redundancy Check •In a cyclic code, if a codeword is cyclically shifted (rotated), the result is another codeword. • Example: • if 1011000 is a codeword and we cyclically left-shift, then 0110001 is also a codeword. 18-09-2024 G. V.Vidya Lakshmi 23
  • 24.
  • 25.
    The Process ofCRC: At the Sender • The encoder or the dataword has k bits (4 here).The codeword (polynomial) has n bits ( 7). • The size of the dataword is augmented by adding n-k (3 here) 0s to the right-hand size of the word. • The generator uses a divisor (using CRC Polynomical x3 +x+1) of size n-k+1 (4 here), predefined and agreed upon. • The generator divides the augmented dataword by the divisor ( modulo-2 division). • The reminder is appended to the dataword to create the codeword. 18-09-2024 G. V.Vidya Lakshmi 25
  • 26.
    The Process ofCRC: At the Receiver • The decoder does the same division process as the encoder. • The reminder of the division is the syndrome. • If the syndrome is all 0s, there is no error, the dataword separated from the received codeword and accepted. • Otherwise, everything is discarded. 18-09-2024 G. V.Vidya Lakshmi 26
  • 27.
    Division in CRCencoder 18-09-2024 G. V.Vidya Lakshmi 27
  • 28.
    Division in theCRC decoder for two cases 18-09-2024 G. V.Vidya Lakshmi 28
  • 29.
    Checksum • Checksum isan error-detecting technique that can be applied to a message of any length. Like CRC, checksum based on the concept of redundancy. 18-09-2024 G. V.Vidya Lakshmi 29
  • 30.
    Checksum Example • Supposethe message is a list of five 4-bit numbers that we want to send to a destination. • In addition to sending these numbers, we send the sum of the numbers. • For example, A sender wants to send the set of numbers (7, 11, 12, 0, 6) the process will be as follow: 1. Sum up the numbers = 7+11+12+0+6 = 36 18-09-2024 G. V.Vidya Lakshmi 30
  • 31.
    Checksum Example 2. Thenconvert the decimal number 36 in binary = (100100)2 . 3. To change it to a 4-bit number ( as the sending numbers) we add the extra leftmost bit to the right four bits as shown below. This is called sum in one’s complement . 18-09-2024 G. V.Vidya Lakshmi 31
  • 32.
    Checksum Example 4. Thencomplements the result to get the checksum. 6 = ( 0110)2 , 5. The complement of 6 = 15 - 6 = 9 Or (1001)2 = 9 = (1001)2 6. The sender sends the five data numbers and the checksum (7, 11, 12, 0, 6, 9). • If there is no corruption in transmission, the receiver receives (7, 11, 12, 0, 6, 9) and adds them in one’s complement to get 15. 18-09-2024 G. V.Vidya Lakshmi 32
  • 33.
  • 34.
    Error Correcting code:Hamming code • Hamming code is a set of error-correction codes that can be used to detect and correct the errors that can occur when the data is moved or stored from the sender to the receiver. It is technique developed by R.W. Hamming for error correction. • Redundant Bits: Redundant bits are extra binary bits that are generated and added to the information-carrying bits of data transfer to ensure that no bits were lost during the data transfer. • The redundancy bits are placed at certain calculated positions to eliminate the errors and the distance between the two redundancy bits is called "Hamming Distance". 18-09-2024 G. V.Vidya Lakshmi 34
  • 35.
    Error Correcting code:Hamming code • This is the relationship between data bits and redundancy bits to correct a single-bit error. A-frame consists of M data bits and P redundant bits. Suppose the total length of the frame be N (N=M+P). An N-bit unit containing data and the check bit is often referred to as an N-bit codeword. • The following formula is used to find the number of redundant bits. • Number of single-bit errors = M + P and Number of states for no error = 1 • So, the number of redundant bits (P) that represent all states (M+P+1) must satisfy − 2P ≥ 𝑀 + P + 1 • where P = Redundant bit, and M = data bit. 18-09-2024 G. V.Vidya Lakshmi 35
  • 36.
    Parity bits • Evenparity bit: In the case of even parity, for a given set of bits, the number of 1’s are counted. If that count is odd, the parity bit value is set to 1, making the total count of occurrences of 1’s an even number. If the total number of 1’s in a given set of bits is already even, the parity bit’s value is 0. • Odd Parity bit: In the case of odd parity, for a given set of bits, the number of 1’s are counted. If that count is even, the parity bit value is set to 1, making the total count of occurrences of 1’s an odd number. If the total number of 1’s in a given set of bits is already odd, the parity bit’s value is 0. 18-09-2024 G. V.Vidya Lakshmi 36
  • 37.
    Error Correction- HammingCode 18-09-2024 G. V.Vidya Lakshmi 37
  • 38.
    A Layout ofData and Check Bits that Achieves Our Design Criteria: 18-09-2024 G. V.Vidya Lakshmi 38 Bit position 11 10 9 8 7 6 5 4 3 2 1 Bit number 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001 Data bit D7 D6 D5 D4 D3 D2 D1 Redundancy bit r8 r4 r2 r1
  • 39.
    Hamming Code 18-09-2024 G.V.Vidya Lakshmi 39 r1 is a parity check on every data bit whose position is xxx1 r2 is a parity check on every data bit whose position is xx1x
  • 40.
    Hamming Code 18-09-2024 G.V.Vidya Lakshmi 40 r1 is a parity check on every data bit whose position is xxx1 r2 is a parity check on every data bit whose position is xx1x
  • 41.
    Hamming Code 18-09-2024 G.V.Vidya Lakshmi 41 r4 is a parity check on every data bit whose position is x1xx r8 is a parity check on every data bit whose position is 1xxx
  • 42.
    Hamming Code 18-09-2024 G.V.Vidya Lakshmi 42
  • 43.
    Algorithm of Hammingcode • Step 1 − First write the bit positions starting from 1 in a binary form (00, 10, 11,100, etc.) • Step 2 − Mark all the bit positions that are powers of two as parity bits (1, 2, 4, 8, 16, 32, 64, etc.) • Step 3 − All other bit positions are for the data to be encoded using (3, 5, 6, 7, 9, 10 and 11, etc.) 18-09-2024 G. V.Vidya Lakshmi 43
  • 44.
    Finding Parity bit •Position 1 − Check 1 bit, then skip 1 bit, check 1 bit and then skip 1 bit and so on (Ex − 1,3,5,7,11, etc.) • Position 2 − Check 2 bit, then skip 2 bit, check 2 bit, then skip 2 bit (Ex − 2,3,6,7,10,11,14,15, etc.) • Position 4 − Check 4 bit, then skip 4 bit, check 4 bit, then skip 4 bit (Ex − 4, 5, 6, 7, 12, 13, 14, 15, etc.) • Position 8 − Check 8 bit, then skip 8 bit, check 8 bit, then skip 8 bit (Ex − 8, 9, 10, 11, 12, 13, 14, 15, 24, 25, 26, 27, 28, 29, 30, 31). • Set the parity bit 1 if the total number of 1s in the positions it checks odd or set the parity bit 0 if the total number of 1s in the positions it checks even. 18-09-2024 G. V.Vidya Lakshmi 44
  • 45.
    Example of HammingCode 18-09-2024 G. V.Vidya Lakshmi 45
  • 46.
  • 47.
    Hamming Code SyndromeDesign Criteria For convenience, we would like to generate a 4-bit hamming code for 8-bit dataword with the following characteristics: • If the syndrome contains all 0’s, no error has been detected. • If the syndrome contains one and only bit set to 1, then an error has occurred in one of the 4 check bits. No correction is needed. • If the syndrome contains more than one bit set to 1, then the numerical value of the syndrome indicates the position of the data bit in error. This data bit is inverted for correction. 18-09-2024 G. V.Vidya Lakshmi 47
  • 48.
  • 49.
    Example-1 • Generate hammingcode for the data word 1110 • Generate hamming code for the dataword 1011001 18-09-2024 G. V.Vidya Lakshmi 49
  • 50.
    Burst Error Correction-with Hamming code