1.2.10 Error Detection and Correction  Summary and Q&A
TL;DR
Hamming distance is a useful tool for measuring differences between encodings and can be used to detect singlebit errors in code words.
Key Insights
 🥺 Singlebit errors in encoded data can lead to misinterpretation of the data.
 🆘 Hamming distance measures the differences between encodings, which can help identify errors.
 A minimum Hamming distance of at least 2 is needed to detect singlebit errors using parity.
 🕵️ Parity can only detect singlebit errors, and a more sophisticated encoding is needed to detect multiple errors.
 #️⃣ To detect a certain number of errors, the minimum Hamming distance between code words should be one more than the number of errors.
Transcript
Now let's think a bit about what happens if there's an error and one or more of the bits in our encoded data gets corrupted. We'll focus on singlebit errors, but much of what we discuss can be generalized to multibit errors. For example, consider encoding the results of some unpredictable event, e.g., flipping a fair coin. There are two outcomes:... Read More
Questions & Answers
Q: What is the purpose of Hamming distance in error detection?
Hamming distance helps measure the differences between encodings, allowing us to identify singlebit errors in code words.
Q: How does the simple encoding of "heads" and "tails" fail in error detection?
The simple encoding has a Hamming distance of 1 between the code words "0" and "1", making it impossible to differentiate between an uncorrupted encoding of "tails" and a corrupted encoding of "heads".
Q: How does adding a parity bit help in error detection?
Adding a parity bit increases the minimum Hamming distance between code words from 1 to 2. This enables the detection of singlebit errors since corrupted code words will have an odd number of 1bits.
Q: Can parity detect errors with an even number of bit errors?
No, parity can only detect singlebit errors. If there are an even number of bit errors, corrupted code words will have an even number of 1bits and may appear to be valid.
Summary & Key Takeaways

Singlebit errors in encoded data can occur during transmission and lead to misinterpretation of the data.

Hamming distance is defined as the number of differing positions between two encodings of the same length.

By choosing code words with a minimum Hamming distance of at least 2, singlebit errors can be detected using parity bits.