ERROR CORRECTION:
 Error correction is the process of detecting and fixing errors that occur when
data is transmitted or stored, so that the original, correct data can be
recovered.
 There are two main methods of error correction:1.
 Forward Error Correction (FEC):
 The sender adds extra redundant bits to the data before sending it.The
receiver uses these bits to detect and fix errors on its own, without asking for
retransmission.
 Advantages:
 No need to resend the data.Works well in real-time systems (e.g., live
streaming, satellite communication) where retransmission is not possible.
2. Backward Error Correction (BEC):
 The receiver checks the received data for errors (using techniques like checksums
or CRC).If an error is found, the receiver requests the sender to retransmit the data.
 Advantages:
 Ensures high accuracy.Drawbacks:Requires additional time and communication
for retransmission.
HAMMING CODE :
 One of the most common error correction methods is the Hamming Code.
 Developed by R.W. Hamming.
 Works by adding extra bits, called parity bits, to the original data.
Example: Step-by-Step Encoding Process
Step 1: Choose data bits
 Let’s say we have m = 4 data bits:
 Data bits = 1101
Step 2: Calculate number of parity bits (r)
Formula:
2 ^ r ≥ m + r + 1
 Step 3: Bit Positioning
 Parity bits are placed at positions that are powers of 2: 1, 2, 4.
 Bit positions (from left to right):
7 6 5 4 3 2 1
d4 d3 d2 P4 d1 P2 P1
 Placing data bits (1101):
7 6 5 4 3 2 1
1 1 0 P4 1 P2 P1
Step 4: Parity Bit Coverage (Even Parity)
 P1 covers positions: 1, 3, 5, 7
Values: P1, 1, 0, 1 → P1, 1, 0, 1 → ones count = 2 + P1 → parity = 0 → P1 =
0
 P2 covers positions: 2, 3, 6, 7
Values: P2, 1, 1, 1 → P2, 1, 1, 1 → ones count = 3 + P2 → parity = 0 → P2 =
1
 P4 covers positions: 4, 5, 6, 7
Values: P4, 0, 1, 1 → P4, 0, 1, 1 → ones count = 2 + P4 → parity = 0 → P4 = 0
 Final Encoded Bits (Even Parity):
 Bit positions: 7 6 5 4 3 2 1
1 1 0 0 1 1 0
Step 5: Receiver Side – Error Detection
 Suppose the receiver gets:
 1 1 0 0 0 1 0
 (This means bit at position 3 got flipped from 1 → 0)
 Check Parity Bits:
 P1 (1, 3, 5, 7) → 0, 0, 0, 1 → ones = 1 → parity = 1 → error in P1’s group
 P2 (2, 3, 6, 7) → 1, 0, 1, 1 → ones = 3 → parity = 1 → error in P2’s group
 P4 (4, 5, 6, 7) → 0, 0, 1, 1 → ones = 2 → parity = 0 → no error in P4’s group
 Error position = P4 P2 P1 = 0 1 1 = 3
 Error found at bit position 3.
 Step 6: Correct the Error
 Flip bit at position 3 (0 → 1):
 Corrected code:
 1 1 0 0 1 1 0

Error Correction........................

  • 1.
    ERROR CORRECTION:  Errorcorrection is the process of detecting and fixing errors that occur when data is transmitted or stored, so that the original, correct data can be recovered.  There are two main methods of error correction:1.  Forward Error Correction (FEC):  The sender adds extra redundant bits to the data before sending it.The receiver uses these bits to detect and fix errors on its own, without asking for retransmission.  Advantages:  No need to resend the data.Works well in real-time systems (e.g., live streaming, satellite communication) where retransmission is not possible.
  • 2.
    2. Backward ErrorCorrection (BEC):  The receiver checks the received data for errors (using techniques like checksums or CRC).If an error is found, the receiver requests the sender to retransmit the data.  Advantages:  Ensures high accuracy.Drawbacks:Requires additional time and communication for retransmission. HAMMING CODE :  One of the most common error correction methods is the Hamming Code.  Developed by R.W. Hamming.  Works by adding extra bits, called parity bits, to the original data.
  • 3.
    Example: Step-by-Step EncodingProcess Step 1: Choose data bits  Let’s say we have m = 4 data bits:  Data bits = 1101 Step 2: Calculate number of parity bits (r) Formula: 2 ^ r ≥ m + r + 1
  • 4.
     Step 3:Bit Positioning  Parity bits are placed at positions that are powers of 2: 1, 2, 4.  Bit positions (from left to right): 7 6 5 4 3 2 1 d4 d3 d2 P4 d1 P2 P1  Placing data bits (1101): 7 6 5 4 3 2 1 1 1 0 P4 1 P2 P1
  • 5.
    Step 4: ParityBit Coverage (Even Parity)  P1 covers positions: 1, 3, 5, 7 Values: P1, 1, 0, 1 → P1, 1, 0, 1 → ones count = 2 + P1 → parity = 0 → P1 = 0  P2 covers positions: 2, 3, 6, 7 Values: P2, 1, 1, 1 → P2, 1, 1, 1 → ones count = 3 + P2 → parity = 0 → P2 = 1  P4 covers positions: 4, 5, 6, 7 Values: P4, 0, 1, 1 → P4, 0, 1, 1 → ones count = 2 + P4 → parity = 0 → P4 = 0
  • 6.
     Final EncodedBits (Even Parity):  Bit positions: 7 6 5 4 3 2 1 1 1 0 0 1 1 0 Step 5: Receiver Side – Error Detection  Suppose the receiver gets:  1 1 0 0 0 1 0  (This means bit at position 3 got flipped from 1 → 0)
  • 7.
     Check ParityBits:  P1 (1, 3, 5, 7) → 0, 0, 0, 1 → ones = 1 → parity = 1 → error in P1’s group  P2 (2, 3, 6, 7) → 1, 0, 1, 1 → ones = 3 → parity = 1 → error in P2’s group  P4 (4, 5, 6, 7) → 0, 0, 1, 1 → ones = 2 → parity = 0 → no error in P4’s group  Error position = P4 P2 P1 = 0 1 1 = 3  Error found at bit position 3.  Step 6: Correct the Error  Flip bit at position 3 (0 → 1):  Corrected code:  1 1 0 0 1 1 0