🎓 BookMCQ
← Back to 10. Error Detection and Correction

📝 XOR Error Detecting Technique (11 MCQs)

Exclusive OR as a Recovery Operation

Exclusive OR provides a simple way to create redundancy for forward error correction. A sender divides a packet into equal-length chunks and calculates one parity chunk by XORing all data chunks. If one chunk is known to be missing, the receiver can reconstruct it by XORing the parity chunk with every remaining data chunk. This distinction helps the receiver choose an appropriate integrity check for each frame.

XOR Properties Enable Missing-Chunk Reconstruction

XOR outputs one when its input bits differ and zero when they match. It is associative, commutative, and satisfies A XOR A equals zero and A XOR zero equals A. These properties allow the original value to be isolated by XORing the known chunks with the stored parity result. Both endpoints must use matching parameters for the check to be interpreted correctly.

Generating and Applying a Redundancy Chunk

The sender computes a bitwise XOR across N chunks and sends the N original chunks plus the additional parity chunk. The receiver stores the parity and data chunks. If one chunk is erased and its position is known, it combines all surviving chunks with parity to recreate the missing sequence. This check takes place before the receiver accepts the protected information.

Recovering One Erased Chunk from Four Data Chunks

Let chunks be 1010, 1100, 0110, and 0011. Their XOR parity is 0001. If the second chunk is lost, XOR 0001 with 1010, 0110, and 0011; the result is 1100, recovering the missing chunk exactly. Recovery works for one erasure. The example makes the coding rule visible through a reproducible bit sequence.

XOR-Based Forward Error Correction for Packets

XOR parity can protect multimedia packet groups when a receiver cannot wait for retransmission. For N data chunks, one parity chunk adds 1/N overhead; with four data chunks, overhead is 25 percent. The method is simple but normally recovers only one known erasure per group. Its suitability depends on traffic type, delay limits, and acceptable redundancy overhead.

Erasure Recovery Is Not the Same as Error Location

'XOR parity identifies any unknown corrupted chunk' is false; it needs the missing position or a separate error detector. 'Two missing chunks can always be recovered' is false with only one parity chunk. 'Parity duplicates one chunk' is false; it combines all chunks bitwise. These distinctions prevent confusion between detection, recovery, and general data integrity.

Solving XOR Recovery Problems Bit by Bit

Calculate parity by aligning chunk bits and applying XOR column by column. For recovery, combine parity with every surviving chunk and check that the reconstructed value matches the expected length. State the one-erasure limitation and distinguish a lost chunk from an undetected corrupted chunk. Show intermediate steps and state assumptions behind any calculated result.

XOR Recovery Terms

  • XOR - Combines bits exclusively.
  • Parity chunk - XOR combination of data.
  • Erasure - Known-position missing data unit.
  • Recovery - Reconstructs missing data chunk.
  • Overhead - Extra bits beyond payload.
  • FEC - Corrects errors without retransmission.
3
Easy
5
Medium
3
Hard

📝 All XOR Error Detecting Technique MCQs

Q1. If a data block DD is XOR‑ed with a checksum CC to produce the transmitted word T=D⊕CT = D \oplus C, and the received word is R=T⊕ER = T \oplus E where EE is a single‑bit error, which of the following statements is true about the computed checksum at the receiver?

A.The receiver will recover the original checksum CC regardless of the error.
B.The receiver will detect the error because the recomputed checksum will differ from CC. ✅
C.The error will be corrected automatically by the XOR operation.
D.The error will be invisible to the checksum, so it will go undetected.
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Because XOR is its own inverse, the receiver recomputes the checksum as R⊕C=(T⊕E)⊕C=D⊕ER \oplus C = (T \oplus E) \oplus C = D \oplus E. The extra error bit EE causes the recomputed checksum to differ from the original CC, revealing the presence of an error. Therefore the error is detected, not corrected or ignored.

Q2. Compare the two generator polynomials G1(x)=x7+x3+1G_1(x)=x^7 + x^3 + 1 and G2(x)=x7+x5+x2+1G_2(x)=x^7 + x^5 + x^2 + 1. Which statement correctly describes their burst‑error detection capabilities as given in the content?

A.Both detect all bursts up to length 6, but G2G_2 detects fewer length‑7 bursts.
B.G1G_1 detects all bursts up to length 18, while G2G_2 detects only up to length 6.
C.Both have the same probability of missing length‑8 bursts.
D.G1G_1 detects all bursts up to length 6, and G2G_2 detects all bursts up to length 18. ✅
💡 Difficulty: easy | ✅ Correct: D

📖 Explanation: The content specifies that the first generator can detect all burst errors up to length 6 and has a small slip rate for longer bursts, whereas the second generator extends detection up to length 18. Consequently, G2G_2 offers the broader detection range, making the fourth statement the accurate description of their capabilities.

Q3. Using XOR, how can a parity bit be generated for a 4‑bit word w=w3w2w1w0w = w_3 w_2 w_1 w_0 so that the overall 5‑bit code has even parity?

A.Compute p=w3⊕w2⊕w1⊕w0p = w_3 \oplus w_2 \oplus w_1 \oplus w_0 and append pp. ✅
B.Compute p=w3⊕w2⊕w1⊕w0‾p = \overline{w_3 \oplus w_2 \oplus w_1 \oplus w_0} and append pp.
C.Append a fixed 0 as the parity bit.
D.Append a fixed 1 as the parity bit.
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: An even‑parity code requires the total number of 1’s to be even. XOR of all bits yields 0 when the count of 1’s is even and 1 when it is odd. Therefore, appending the XOR result directly makes the overall count even, satisfying the even‑parity requirement.

Q4. A generator polynomial G(x)=x5+x2+1G(x)=x^5 + x^2 + 1 can detect all burst errors up to length 5. If a burst error of length 6 occurs, what is the logical implication regarding detection probability?

A.The error will always be detected because any longer burst contains a shorter detectable pattern.
B.The error will be detected with probability 31/32. ✅
C.The error will be detected with certainty only if the error pattern matches the generator.
D.Detection is impossible for bursts longer than the generator degree.
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: For a degree‑5 generator, any error pattern longer than 5 bits has a chance of being divisible by the generator. The probability that a random length‑6 burst is not divisible (and thus detected) is 1−1/25=31/321 - 1/2^{5}=31/32. Hence detection is highly likely but not guaranteed.

Q5. Generator A detects all bursts ≤6 bits, with 3% of length‑7 bursts slipping. Generator B detects all bursts ≤6 bits, with 1% of length‑7 bursts slipping. Which generator provides a better overall reliability for random burst errors up to length 8?

A.Generator A is better because it has lower slip for length‑8 bursts.
B.Generator B is better because it has lower slip for length‑7 bursts, and length‑8 slip rates are equal. ✅
C.Both are equivalent because length‑8 slip dominates.
D.Generator A is better because it detects more length‑6 bursts.
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Reliability depends on the highest slip probability among the considered burst lengths. Since both generators have identical performance for length‑6 bursts, the decisive factor is the slip rate for length‑7 bursts. Generator B’s 1% slip is lower than Generator A’s 3%, making B the more reliable choice for bursts up to length 8.

Q6. In a CRC scheme using XOR, why does appending the remainder of polynomial division to the data ensure that any single‑bit error changes the transmitted frame?

A.Because XOR is linear and flips the remainder bits.
B.Because a single‑bit error introduces a non‑zero polynomial that cannot be divisible by the generator. ✅
C.Because the remainder guarantees even parity.
D.Because the remainder acts as a checksum that masks errors.
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: A single‑bit error corresponds to adding a monomial xkx^k to the transmitted polynomial. If the generator polynomial does not divide this error polynomial (which is true for any non‑trivial generator), the remainder changes, causing the CRC check to fail. Hence the error is always detected.

Q7. What does the XOR (exclusive‑OR) operation output when both input bits are 1?

A.0 ✅
B.1
C.Undefined
D.It outputs both 0 and 1
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: XOR follows the truth table: 0⊕0=0, 0⊕1=1, 1⊕0=1, and 1⊕1=0. Therefore, when both inputs are 1, the result is 0. This fundamental property underlies many error‑detection and cryptographic applications.

Q8. If A⊕B=CA\oplus B = C and C⊕B=DC\oplus B = D, which relationship must hold between AA and DD?

A.A = D ✅
B.A = \overline{D}
C.A and D are unrelated
D.A = B
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: XOR is associative and each value is its own inverse: C=A⊕BC = A\oplus B and D=C⊕B=(A⊕B)⊕B=A⊕(B⊕B)=A⊕0=AD = C\oplus B = (A\oplus B)\oplus B = A\oplus (B\oplus B) = A\oplus 0 = A. Thus DD equals AA, establishing the required relationship.

Q9. A sender uses generator polynomial G(x)=x6+x+1G(x)=x^6 + x + 1 to compute a CRC. An adversary flips bits at positions 2 and 5 of the transmitted frame. Assuming the frame length is 20 bits, determine whether the CRC will detect the error. Choose the correct statement.

A.The error will always be detected because the error pattern has odd weight.
B.The error will be detected unless the flipped bits happen to correspond to a multiple of the generator polynomial.
C.The error will be detected with probability 1−1/2^6.
D.The error may go undetected because the error polynomial could be divisible by G(x)G(x). ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: Flipping two bits creates an error polynomial E(x)=x2+x5E(x)=x^2 + x^5. Detection depends on whether E(x)E(x) is divisible by the generator. Since some error polynomials of weight two can be multiples of certain generators, it is possible (though not guaranteed) that this particular error goes undetected, making statement D correct.

Q10. Given the generator described in part (a) detects all burst errors ≤6 bits, misses 3% of length‑7 bursts, and 1.6% of length‑8 or more bursts, which of the following best describes its overall undetected error rate for random bursts up to length 10, assuming equal likelihood of each length?

A.Approximately 0.78% of random burst errors up to length 10 will be undetected. ✅
B.Approximately 1.6% of random burst errors up to length 10 will be undetected.
C.Approximately 3% of random burst errors up to length 10 will be undetected.
D.The undetected error rate cannot be estimated without knowing the exact distribution.
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: With equal probability for lengths 1‑10, the average undetected rate is (0\*6+3+1.6\*3)/10=(3+4.8)/10=0.78%(0\*6 + 3 + 1.6\*3)/10 = (3 + 4.8)/10 = 0.78\%. This calculation incorporates the zero slip for lengths ≤6, the 3% slip for length 7, and the 1.6% slip for lengths 8‑10, yielding the stated estimate.

Q11. Explain why XOR is suitable for implementing a linear feedback shift register (LFSR) used in CRC generation, focusing on its algebraic properties.

A.XOR corresponds to addition modulo‑2, making the feedback polynomial operations linear and allowing the LFSR to compute remainders efficiently. ✅
B.XOR provides a non‑linear mapping that randomizes the output, improving error detection.
C.XOR ensures that each bit of the register toggles independently of the others.
D.XOR allows the LFSR to store the original data bits unchanged.
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: XOR implements addition in the binary field GF(2), which is both associative and commutative, and each element is its own inverse. These properties give the LFSR a linear structure that mirrors polynomial division modulo 2, enabling fast and exact computation of CRC remainders without carry propagation.

🔗 Related Topics (MCQs)