Tech Talk: Checksums and CRCs (2024)

Table of Contents
Related Articles Transcript

A checksum is anumerical check value calculated from a larger set of data. A checksum is most often used when sending a packet of data over a network or other communications channel. One checksum formula is a simple addition, with overflow ignored, wherein the bytes of the packet are added together into a variable of a fixed size/width (say, 16 bits) as they are sent. The checksum is typically sent at the end of the packet and used at the receiving end to confirm the integrity of the preceding data.

A CRCor cyclic redundancy checkis based on division instead of addition. The error detection capabilities of a CRC make it a much stronger checksum and, therefore, often worth the price of additional computational complexity.

Embedded software expert Michael Barr discusses the importance of checksums and CRCs, and how you can integrate them into your code.

Download Barr Group'sCRC Code-C (Free)

Related Articles

CRC Series, Part 1: Additive Checksums

CRC Series, Part 2: CRC Mathematics and Theory

CRC Series, Part 3: CRC Implementation Code in C/C++

Transcript

Michael Barr: This morning we’re talking about Checksums and CRCs. A CRC which is short for a Cyclic Redundancy Code is a powerful type of a checksum. A checksum is any sort of a mathematical operation that you can perform on data to make sure that the bits don’t get flipped accidentally when it’s stored in a memory or when it’s transmitted over to a network. A CRC is a particularly powerful type of a checksum, mostly because it’s very difficult to fool a CRC. So, CRCs are widely used. One of the benefits of them is not only are they difficult to fool, but they’re relatively compact most are either 16 or 32 bits, so just taking up two or four bytes of additional storage.

So, you might have a large packet that’s going to go out over to the network like a network packet for the Internet Protocol might be 1500 bytes long. But you only need four additional bytes to store a 32-bit CRC to ensure that the data has not been corrupted. It’s not universally perfect, but mathematically it’s very difficult to fool. There are lots of – CRC is just a general concept. There is lots of – it’s a mathematical process, but there are different specific algorithms or formulas that you can apply based on what’s known as the generator polynomial. And so, one of the standards that’s widely used is what’s called the CRC-32 written like this and that’s the standard CRC-32 meaning 32 bits that is used widely over the internet for ensuring that data is accurate. But there are others as well including 16-bit CRCs and a variety of different generator polynomials and other specific techniques.

One of the things that’s tricky for engineers when you’re going to implement a CRC is that if you’re using a general purpose processor or even a pen and a paper, computing a CRC is complex mathematically, because it operates on something that’s called Modulo-2 addition which is the kind of binary arithmetic. And you can build special dedicated hardware to do this quickly and sometimes you see that. But if you’ve got to write it in your C program or your C++ program for embedded systems it can be tricky and it’s something that you shouldn’t waste your time doing because there are existing solutions for it.

On our website at barrgroup.com, you’ll find three very popular articles about CRCs explaining what they are, how they work and what the property’s protection are. Also, how to implement them in C and along with the how to implement them in C article is resource code that I wrote about 15 years ago and has been used by thousands of embedded software engineers and it’s probably deployed in millions of systems already. And it’s been proven time and time again to implement CRCs of specific polynomials. You can choose the polynomial or change it to your liking. This is easy to use and it’s a good reusable code that’s available for free on our website for your download.

Tech Talk: Checksums and CRCs (2024)
Top Articles
What is the difference between LinkedIn Articles and LinkedIn Posts?
Should I Tell My Therapist Everything?
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Selly Medaline
Latest Posts
Article information

Author: Terrell Hackett

Last Updated:

Views: 6157

Rating: 4.1 / 5 (52 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Terrell Hackett

Birthday: 1992-03-17

Address: Suite 453 459 Gibson Squares, East Adriane, AK 71925-5692

Phone: +21811810803470

Job: Chief Representative

Hobby: Board games, Rock climbing, Ghost hunting, Origami, Kabaddi, Mushroom hunting, Gaming

Introduction: My name is Terrell Hackett, I am a gleaming, brainy, courageous, helpful, healthy, cooperative, graceful person who loves writing and wants to share my knowledge and understanding with you.