What is error correction? Hamming codes in hardware
Hi everyone,
Here's a preview of my next video. This one's a bit of a departure from the 6502 project I've been working on, though fear not, I'll be back to that with the next video. In some sense this is a continuation of the error detection and correction mini-series I did a while back. But the real motivation is that my friend Grant, who runs the amazing 3blue1brown channel has been interested in error-correcting codes recently, so we both decided to make videos on the subject.
As always, any feedback is appreciated. There are still a few things I plan to tweak, and of course I will be adding in shoutouts to Grant's videos at the appropriate spots. So if you spot anything that seems confusing or wrong, I'll try to fix it before releasing.
Grant already posted previews of his videos on his Patreon page. He gives a different (and amazingly good) treatment of the same subject. If you're not already supporting him, well, you should really consider it. But otherwise, here are previews of his videos: Hamming codes part 1 and Hamming codes part 2.
And again, thanks for your support!
What is error correction? Hamming codes in hardware (YouTube)
Comments (7)
As a young engineer (graduated a couple of years ago) who studied computer science but became more interested in electronics and is now working mostly in the later, I'm so glad to have been born at just the right time to have access to free resources of such quality such as your channel and 3blue1brown's, to learn on my own on my spare time. Thanks a lot ! Regarding this video in particular, it is brilliantly explained, and complements very well the videos by 3blue1brown.
Excellent work, well explained.
Thanks for another fantastic video! I've done plenty of work with CRCs for error detection but never really delved into Hamming codes for correcting errors, so I thoroughly enjoyed this excellent explanation of how they work. At the 15:00 mark where you explain that D2 is wrong due to P1 and P3 being incorrect, initially it didn't sink in that it couldn't have been D4 because P2 was correct (until you mentioned it later at 15:09), and I needed to replay that part to fully understand it. I might have understood it the first time if you had said something like "the only case that's covered by party bit 1 and 3 being wrong ... AND parity bit 2 being correct ... is this case here".
The point that Michael Tedder makes was one that tripped me up too. At 23m12s you say "if we know that those two parity bits [P3 and P2] are wrong ... the only case where both of those could be wrong is if bit D3 is flipped". But it looked to me that P3 and P2 would also be wrong if bit D4 were flipped. As I understand it, what eliminates that possibility is the fact that flipping D4 would also make P1 show a parity error, and since we can see that P1 does not show a parity this cannot be the problem. Only flipping D3 would make P3 and P2 show a parity error and P1 not. If that is right, I don't know how you might want to unpack that point for people as easily tripped up as me! Regards Gabriel Egan
Very nice. I know there's a lot there already but it would be great to say how that final extra bit of parity would work. As I understand it, standard parity can't detect two-bit errors at all! Or maybe it's a nice challenge for viewers to figure out and comment on. 🙂
Grant covers it really well in his videos, so perhaps it's worth me mentioning that explicitly when I mention them. But you're correct that standard parity can't detect two-bit errors. The trick is that with the Hamming scheme we can fix any one-bit error in the first 7 bits. So if we fix a one-bit error and the extra parity bit tells us there's still a one-bit error, then we've detected a 2-bit error.
I love it 😉
