ELI5: Explain Like I'm 5

Computation of cyclic redundancy checks

Alright kiddo, so let me explain what cyclic redundancy checks (CRCs) are and how they work using a fun and easy-to-understand example.

Think of a CRC as a special code that someone creates to double-check if a message has been sent correctly from one computer to another. It's like when you're playing a game of telephone with your friends: one person whispers a message to the next person in line, and it keeps getting passed along until it reaches the end. But sometimes, the message gets messed up along the way and ends up being different than what the first person said.

In computer terms, this is called an "error." And when errors happen during the transfer of important data like emails or pictures, it can cause big problems. That's where CRCs come in handy.

To create a CRC, we start by taking the message that we want to send and dividing it into smaller chunks called "bytes." Just like how you can divide a large cookie into smaller pieces to share with your friends.

Then, we add something called a "redundancy check" to each byte. This is like a secret code that we create using a special formula. It's kind of like baking cookies: you have a recipe that tells you what ingredients to mix together and in what order, and that's what creates the delicious treats.

The formula we use for CRCs is called a "polynomial." I know that's a big word, but it just means a math problem that uses variables to solve for a certain value. In this case, the value we're solving for is the redundancy check code.

Now, let's say we have a message that is 10 bytes long. We would take each byte and run it through the polynomial formula to generate a redundancy check code for each byte. Then, we would add up all of those codes together to create a final CRC code for the entire message.

This CRC code is like a unique fingerprint for the message. It tells us exactly what that message should look like and helps us verify if it has been sent correctly. When the message is sent from one computer to another, the receiving computer can perform the same polynomial formula on each byte, adding up all of the redundancy check codes to create its own CRC code. If the CRC code matches the one that was sent with the message, then we know for sure that the message has been sent correctly and there were no errors.

Just like how you count the number of sprinkles on top of your cupcake to make sure it's the same as your friend's, computers use CRCs to count the number of bits in a message and make sure they all match up. And that's how cyclic redundancy checks work in a nutshell!