Computing CRC (used to feel simpler earlier)

Started by networkloser, July 22, 2025, 06:55:17 AM

Previous topic - Next topic

networkloser

Now, I'm absolutely unsure why is CRC giving me a headache.  :-X

Say I've this data to be sent with CRC:

1010

Now, I need CRC bits for this. Fourouzan and Kurose Ross book are too dense for me currently. Can anyone share some insightful materials to learn this? Something easier for my brain. :eek:

Grateful to any kind of help. Chatgpt and deepseek seems to be in what direction they have no idea

networkloser

There are things like C(7,4), CRC-8, different representations.

deanwebb

Well, time for me to do a deeper dive into CRCs...

In networking, the CRC is typically calculated on the fly as the data goes out of the network interface and is added to the end of the transmission. There is a SHA checksum with the data that is actually used to check for data integrity, so the CRC in networking is for the datalink to determine if there are any bit errors. CRC itself is too lightweight to do a proper integrity check, which is why the SHA checksum is included with the data set proper.

In environments with low to non existent error rates, CRC can be seen as redundant, especially with TCP data being sent with a SHA checksum on it. In operational technology (OT) environments, however, where the gear is thinly provisioned and data transmission is a priority, the CRC is used on the OT protocols as a quick and easy way to determine if the data arrived completely or if a retransmission is required.

For your case, the maths are by the sending system. Honestly, it does not matter what algorithm is used, so long as it's the one for the protocol being transmitted. Humans do not calculate CRC. :)

The data, 1010, will be manipulated until the system gets 0 and a remainder. The remainder are the CRC bits.

https://en.wikipedia.org/wiki/Cyclic_redundancy_check#Computation shows a sample calculation.

But in the real world, we don't look at the CRCs. We *will* look at CRC error rates on a device and, when they get too high, will consider corrective action on the hardware or connecting media.
Take a baseball bat and trash all the routers, shout out "IT'S A NETWORK PROBLEM NOW, SUCKERS!" and then peel out of the parking lot in your Ferrari.
"The world could perish if people only worked on things that were easy to handle." -- Vladimir Savchenko
Вопросы есть? Вопросов нет! | BCEB: Belkin Certified Expert Baffler | "Plan B is Plan A with an element of panic." -- John Clarke
Accounting is architecture, remember that!
Air gaps are high-latency Internet connections.