How do CRCs work?
Вставка
- Опубліковано 14 тра 2024
- CRC (cyclic redundancy check) is one of the most common methods of error detection. It uses some interesting mathematical tricks to guarantee that it can catch certain kinds of errors. How does it work?
Support these videos on Patreon: / beneater or eater.net/support for other ways to support.
00:00 - Detecting errors with modulo division
10:51 - Message data as a polynomial
16:41 - Finite fields
22:57 - Polynomial division
31:04 - Sending and verifying CRC
36:29 - Choosing a generator polynomial
------------------
Social media:
Website: www.eater.net
Twitter: / ben_eater
Patreon: / beneater
Reddit: / beneater
Special thanks to these supporters for making this video possible:
Ben Dyson
Ben Kamens
Ben Williams
Brandon Stranzl
Christopher Blackmon
Debilu Krastas
Eric Dynowski
Gonzalo Belascuen
Greg Stratton
Jay Binks
Jayne Gabriele
Johnathan Roatch
Jordan Scales
Manne Moquist
Michael
Nicholas Moresco
Nick Wrightsman
Randy True
Ric Allinson
Sachin Chitale
SonOfSofaman
Ah yes, "what is x". A strangely profound question in modern algebra.
According to some of my teachers, it was the only question...
x = y - 90°
"a letter"
Because the coefficients of all the the Xs are either 0 or 1, why we do-not replace the X with the number 2?
@@adamlanghans lol
25 comments, 58 views, 21 likes, 0 dislikes. So I'm fairly early in the viewing.
I'm so Damn impressed. I'm 70, a retired Electrical Engineer, and had glancing contact with CRC back in late 60's early 70's, and figured I'd get back to clarifying it to my satisfaction later on in my life, as time allowed. I long ago forgot that "promise to myself", and thru disuse, long ago lost the discipline of the required regimen to reconstruct the required elements, to then reassemble. I ramble. I AM SO PLEASED, to see with such clarity, as pure as the resonance of the ringing of a bell. It is as an epiphany. Thank You So Much, for the intense effort and discipline, you've achieved. I REALLY ENJOYED YOUR PRESENTATION, have seen some , and expect to witness many more of your videos. They are quite refreshing, and a reaffirmation of many of my previous studies. At my age, what a joy. Opening so many new refreshing avenues of research. Keep up the good work. Thanks.
Ditto.
@@donprefontaine3237 re-ditto
Similar to Junk Mail, I'm 60. E.E. (Not retired). This really is an exceptional piece of work.
My Dad has a similar background (and age). I've been thinking of sending him this playlist's link and some description (as I've been *adoring* it). Seeing your comment I decided to just do it now, and the description is mostly a copy-paste of what you've written.
24 year old electrical engineer fresh out of school here, what I like about Ben's videos is how accessible and engaging these lessons are. Exactly like you said sometimes I've found in school that I make "promises to myself" that I will learn this material better once I'm out of school and that right now I just need to memorize answers so I can pass. But I've been watching these videos for the last four years and they have really helped me stop and take the time to dive into the required elements like you say. It's made me feel much more secure about my skills in the embedded systems/comp arch world and the ability to dive deep like this was critical in getting through grad school. I'm glad his videos can do something for anyone no matter what their experience.
Probably the most comprehensive explanation for CRC on UA-cam. Not only just how to do it, but also the reasoning behind it. Thank you.
If you have already seen the video but you want to review just a part of it (say, you are building a project which uses a CRC):
00:00 - Detecting errors with modulo division
10:51 - Message data as a polynomial
16:41 - Finite fields
22:57 - Polynomial division
31:04 - Sending and verifying CRC
36:29 - Choosing a generator polynomial
Paolo Lucchesi Fuck me just when you see smart guys like Ben breaking things like a genius down so I understand, he mentions professors that sit around all day finding the best generator polynomials vs overheads vs message sizes. Incredible stuff!
UA-cam allows chapters now, maybe Ben could use them and make everyone's life easier.
Ben, this is a real good video on CRC, I used CRC-32 multiple times in software, and relyed on some 3th party implementation to construct or validate it, but I never understood why it worked. Thanks you very much and I cannot wait for the next video to see the ex-or in action. Jeroen.
XOR
I'm not an engineer, I have no plans to build low-level computer hardware any time soon, but I look forward to every one of your videos. You have the spectacular ability of making complex concepts less intimidating and more digestible.
Tobias Fried I’m no engineer but I can’t wait to build a low level computer to show my kids how it works!
Besides being great explanation, I really like how you used pen and paper instead of computer graphics and animations. It adds sentimental value to video.
he knows the truth. never trust computers. :]
Marko you might like "Diode gone wild" on UA-cam also. He uses good ol' pen and paper too! 😁 Not a programming channel but great electronics stuff!
@@Bob3519 Looks great. Subbed.
As he said one needs to do it by hand to see the pattern :-)
Makes it more organic.
Dammit, I've just watched a video about CRC?
And I understood it.
And I even liked it!
Damn, I am a geek indeed.
Neeeerrrrd...! I liked it too though! It's a nice feeling when you understand something new. :)
Hell yeah we are 😤🤓
The quality of these videos!!!! Makes learning new things so fun! Love your videos ben❤️!
I'm so glad I found this channel! Your explanation is outstanding...can't thank you enough!!
Finally! Another great video.. We really missed you a lot, Ben :)
Old retired software engineer here. Used CRC countless times but never really understood it till now. Great presentation! Thanks.
Absolutely superb videos, Ben. The effort you go to in producing these is phenomenal. Quite simply, thank you.
Awesome! I love how clearly you are able to convey this while using simple pen and paper. No over-fancy graphics and a very well thought-through structure.
Ben, glad to see that you are back. You are so incredibly talented at explaining these things in a simple manner. Thank you :o)
I was looking for something like this a few weeks ago. The structure and clarity of your explanation is remarkable. I look forward for the HW implementation video.
The clarity and depth of content in your videos are unmatched. Simply outstanding!
Ben, the best think about your videos is their detail. I appreciate you taking the time to share your knowledge. I have watched every one you have made multiple times.
I started my career as a communications technician in the late 70'sand became a communications programmer in the early 80's. I've worked with crc16 and crc32, but never knew the details at this level. I always relied on either the hardware or canned software to do the trick. Thanks for taking the time to explain this. I always wanted to understand the details. I remember trying to read a paper on the subject. It took me a while to realize that this paper was so verbose as to start off by taking 3/4 of a page to explain the mathematical concept of a bit! (He must have had a word quota). I got frustrated and gave up. Thanks for explaining this in a concise way I can understand. Now that I'm retiring and playing with Arduinos, I'd love to see how you do this in hardware. Thanks again!
Your three spaces between sentences is messing with my head... One is internet standard, and two is a common holdover from typewriters and stuff, but where on earth did you get three from?
@@leave-a-comment-at-the-door some people learned to triple space between sentences because they double spaced between words
@@kaitlyn__L double spaces between *words?* If you want more space between words wouldn't you just make the "how much the typewriter moves on the space key" space bigger? It seems excessive to have to press a button twice between every word, you are adding no new information with that extra press if you do it every time
I'm 62 years old telecom engineer in Helsinki, Finland . When I started my studies in U in 80's my major was mathematics. Because I was using computers at home to amuse myself and using communications over phonelines first to local numbers but trough them to more distant computers I started to focus my studies more on computers. So I changed my major to computer technology and quickly realised that what happens within computer is kinda boring, but what happens when they communicate with each other is fascinating. So I changed Us and majored in telecommunications. Through out my studies I tutored my fellow students in math. Modular arithmetics eg. finite fields was always the big question how they work. I always used the clock as an example. When the lecturer wrote those x-polynomials and calculated with them I always changed the x's to a, b, w or what not when I explained the things so that they'd understand that it is just an abstract that is used to make the calculation work.
Ben, this is so well done - I could listen to you for hours. Thanks for this fantastic video that helped me brush up the math I needed for implementing some of the firmware/embedded tasks I've been doing at my job.
Great video, Ben. I've used and coded CRC routines but have never understood the fundamentals of them. Can't wait for the next installment!
You have the gift of deconstructing complexity into triviality. A great teacher! Wish I had classes like that back in mid school... Well we all can have them now. Thanks a lot.
I remember (a long time ago) learning all the error correction stuff, I will have to say, you explain it so well. You'd make a great lecturer.
I truly wish I had this channel when I was younger. The concepts and seemingly esoteric knowledge that you just nail down with simple examples is almost annoying with how obvious it is, having been confused so much by it.
Absolutely amazing teacher and I am so tempted to buy your kit and start making my own computer, because you make it feel entirely attainable.
Definately one of the best and most easily understood explanations I've heard. Bravo. Understanding the detailed math isn't essential. The concept is, and explained very well here.
Just started a new job where we implement a lot of CRC checks, so was great to watch this video and fill in missing areas of my knowledge. Huge thanks!!
Ben, great channel, man. thank you and best of luck!
This video is a gift! CRC is one of those concepts we all use but never stop to ask how it works, and why.
I'd absolutely love to see a video from you on Reed-Solomon codes as used in CDs.
Wow Ben! What a great quality video, as always! Thank you!
This is a really good video. Everything is explained clearly and patiently and I only had to pause at the monstrous polynomial division. I'm really happy to see that you continue to do these videos
Although it's long, I could watch it without any skipping or altering the playback speed. Now I feel like I fully understood CRC and can even apply it to different situations. Helped me a ton studying for my course. Amazing work!
Congratulations Ben, You have single handedly explained the weird math and rational behind the complex operations that take place with such ease. Loved and learnt !!!
This is by far the best math class I've had in decades. You don't speak slowly but you explain it thoroughly. You really know what you're talking about, and all that preparation with the math on paper really helped. Thanks!!!!
Perfect timing! Just as we were talking about this at university. Great resource, love it :)
Excellent video, very interesting and nicely edited explanation. Thank you very much for sharing!
Why must you continue to blow my mind, repeatedly? You are an excellent instructor. Wish I had you as an instructor when I was in VOTEC Electronics.
For my senior design project in CE, we had an app communicating with a microprocessor using a Bluetooth module and our information would at times be sent incorrectly. We had to use a CRC to check that our data was being transmitted correctly and use the Stop-and-Wait ARQ protocol to send acknowledgment checks so that our information was transmitted and received correctly. It took such a long time to understand how CRCs work because the math was very convoluted. I wished this video existed then!
Thank you for an excellent & simple explanation of how CRC works!
I'm looking forward to the next video (I'm really eager to see how you implement them).
The cliffhangers are killing me :D
This video just lit up parts of my brain i have not used since graduating year of high school, then i got a headache. Thank you so much for this video and others in the series, I have always been confused on how checksums, CRC and ECC actually work, really only paying attention to what they provide to my work. I've been in the IT realm for 20 years now and have always been ashamed of my lack of understanding of how most of the low-level components operate and the sheer brilliance in the engineering of it. Your videos are a massive asset to help me get my head around these concepts. I just hope that the crowd touting the likes of "AI" and "machine learning" take the time to understand how the low level machine enables the garbage that they talk. Thank you! I will be blowing the dust of my Arduino kit and playing with some of these things again as time permits. Thank God for the likes of you and Mr. Carlson and so many other great content creators!
So excited for the next video - so far seems like the implementation must be nothing short of magic!
Very patient teacher. Thanks for bringing clarity to this subject
absolutely phenomenal video... Ben you are divine in explaining things!
Dear Ben,
Impressive, what an explanation. Thank you very much for this amazing video, I'm subscribed now and will check your videos as I can. I'm a network engineer trying to fill all the gaps I, as Mr. Junk Mail promised to ourselves would do. Most of these missing pieces are details, so it takes much more time to find the information about it and then fully comprehend it, making it really difficult due to my daily activies. I invested both my days off for searching, refreshing long forgotten math concepts as it was required, practicing on paper just to get a blurry approach of how CRC works, how are the generator polynomials selected, if they are sent to the receiver, if the receiver already has the polynomial beforehand, etc. I was so close to give up for the week, all ready to go work and forget about it slowly overtime. I can't thank you enough for this, but there is something I can do. You can count on me watching your videos and recommend them to my coworkers who also seek to strengthen their knowledge.
Regards from México.
This is so beautifully explained - it (re)seeps into me as I watch - thank you so much for sharing.
Excellent tutorial this, from the basics to the introduction to hardware as well. Thanks a lot !
Amazing, video. Thank you for all the hard work behind it.
I really enjoyed this explanation. Congratulations Ben.
your videos are so rigorous and well explained, it helps me to understand a course I was about to give up because it was not rigorous enough
Brilliant video, very well explained. Many thanks, Ben. Love your channel
Well explained and better than any lectures about information/coding-theory during my studies! Furthermore links the topics (algebra, fields, polynoms) with practical use.
This is a great video to highlight the importance of prime numbers in computing and understanding the value of them from a computing aspect. Greatly appreciate seeing an underlying hint towards primes!
Amazon video! However, I think many ppl who aren't in touch with abstract algebra can find this overly confusing because of the field we are using. The main reason it's confusing is because it looks that the field follows random rules. It is actuslly just a mod 2 field or a xor field which makes it much easier to think about. Anyway great work!
Holy shit, you did a really good job explaining this, starting with simplified and generalized concepts slowly building up to how it's actually done and do a real world example.
Love these videos so much! They're so well explained!
Excellent video. Straight to the point. No need for fancy graphics. I say again: excellent.
This is the best channel on UA-cam about computer engineering. I really love your videos
Some one suggested your channel in the comments of another video. This is the first video I've seen by you. I'm in love.
Excellent. I have had a basic understanding of CRC for over 40 years (300 baud modem days), but under understood the black box details of how it works. Thanks
Another great video! Really taking the magic out of computers, which is awesome.
Wow! Unbelievably clear explanation. Thank you!
This was a beautifully-made video. Thanks!
I have ever seen...such a explanation for CRC .
Thank you very much sir
Excellent video, and very elegantly said. Thank you.
Extraordinary quality. You explained CRC way better than my Profs when studying electrical engineering. Nearly forgot about this topic. Thank you!
Just wow! This video is more than awesome! Many thanks.
Awesome as usual. Thank you, Mr Ben.
Thanks for another great video, Ben!
WOW, this is by far the most complicated thing I have understood from start to end. Fantastic explanation by Ben. Now onto the hardware build video
Wow, I’ve gotten so dumb in my old age. I’ve had delusions of retaking the three semesters of 200 level calculus, but no way. I’m gonna have to start all the way at the beginning with algebra.
What a great presentation, Ben, this is great work. I had an epiphany when you coverted the binary message to real numbers to show how the math works to reconstruct a message at the received end. I always considered the binary math with hesitation and suspicion , but when you did the math using real numbers, my brain went “oh, yeah, of course THAT math works reliably at both sides!” Now that I see it’s not only possible, but that it HAS to work, I just need practice. Lots and lots of practice.
One more bucket list item is to order your breadboard kits and follow along all your marvelous labs. Chuckle, maybe then I won’t still be intimidated by actually learning to program on my C64.
In our Networks class we studied CRC. And in Network Security class we studied about finite field theory. This video was much more intuitive than two regular courses at college. Thanks for your effort in simplifying the mathematical rigour to an understandable level for the common populace.
Thanks Ben. Your content is really great! 😁
Looking forward to next video :) It seems like it's going to be some simple enough xor circuit. Great video ! Thanks
As a CS student, this is an eye opener as to why we need those math courses that we often complain about. Excellent work!
Thank you for these videos, they are amazing.
Brilliant explanation. Thank you sir!
Mind blowing, thats an excelent explanation, I don´t get CRC until now. Thanks.
Loved the whole concept explanation .....this makes me carve for really in studying maths with computer ....Thank you sir
Congrats..I found this to be the most easy to understand explanation on the subject..thank you.!.
Hi, my name is Neil Harrison and way back in the 1980s I was an engineer working for BT. I created the CRC4 frame/mult structure for the 2.048Mbit/s transmission system that became a CCITT standard in G.704/706. Did all the modelling work on a BBC Micro. Seems a long time ago now. Amazed how it lasted. Been retired as a engineer for about 9 years.
Thank you so much for such in-depth video. Thanks.
you are awesome! I could not understand this concept before watching your great video, you are a good teacher!
Awesome video Ben! Can't want to see the hardware implementation :D
Very detailed and clear explanation, thank you!
You are a brilliant teacher, thanks for the knowledge.
Thank you for the well prepared walkthrough..!
Trying to write a software implementation, I read many guides online, tested different calculators, heard of all the terms around CRC, and it only left me wanting to shoot all the guide authors...
You instead started from the beginning, stopping at the problems that resulted in CRC's weird traits.. I also wondered why mathematicians would come up with this fringe thing, but you showed that it's actually pretty general and super powerful, so their involvement was justified.
Excellent video! Can't wait for the next one.
Wow this is incredibly informative. I've been trying to implement my own software implementation of crc32 for a software project and have read several instructive text on the subject, however nothing I've come across actually makes the concept easy to understand and digest like this video.
We'll that's something I never knew I wanted to know. Now I do thanks to someone spending a ton of their time making a 47-minute-long video.
Awesome! Thanks!
Great video, clear, concise and to the point! Thanx! 😃
I'm excited for the next video. I think I understand how to implement this in hardware, and look forward to seeing I'd my solution is similar.
Fantastic explanation. Thank you!
I really liked this video. I too am an electrical engineer and i've used CRC some times but never took the effort to see why it works. Thanks Ben. I wish you were my professor
I loved your illustrations..thank you.
very well done, thank you! Very helpful, just brilliant.
Thank you, Ben!!! Your video is way better than my Professor's lecture and saves my midterm :-)
This is an excellent explanatory video.
Fantastic. Thank you very much for this master class !!!
During the early part of my career I was a hardware tech so I attended a number of classes where the instructor would attempt to explain redundancy checks by tracing through logic diagrams. On something like the error correction logic for reading a disk track this was near impossible. This explanation clears up the questions I always had but never answered. Since I never saw the hardware in this area fail it wasn't a problem but now my curiosity has been satisfied.
Fantastic video! Even though my professor mentioned CRC in her class, I still feel the CRC she taught is not clear enough for me. Then I find this. Thanks.
Mind blown at the XOR part around minute 29.. excellent observation