Enginursday: Playing with CRCs in Python

Recently, the engineering team has needed to implement Cyclic Redundancy Checks (CRCs) for several different projects. The algorithm is easy enough to copy from the internet and forget, but my curiosity just couldn't quit there! CRCs have a very fascinating mathematical underpinning that relates to information theory, computer hardware and more. Trying to get a better understanding of CRCs eventually led me to discover the fantastic legendary ASCII text file called 'crc_v3.txt`. Dr. Ross Williams, the author, once hosted the file at http://www.ross.net, however it can't be found there any more 😔.

Don't fret - everyone knows nothing ever really disappears on the internet, and this is no exception. A work of art and a beacon for curious minds 'crc_v3.txt' will live on forever. You can go pay it a visit here.

Alone 'crc_v3.txt' is a great read, but there are still a few points that might be hard to follow. To satiate my curiosity I created a follow-along Python script to demonstrate the math. You can check it out on GitHub CRC_Exploration or by trying it out live in this post, thanks to the REPL.it widget below. Just click the green 'run' arrow and peruse the output, then try changing the code yourself!

comments | comment feed

Leave a Reply

Your email address will not be published. Required fields are marked *