# CRC Calculator

Use this calculator to easily calculate the CRC-32, CRC-16 or CRC-8 hash of a given string. Check CRC using this CRC generator.

Share calculator:

Embed this tool:
get code

## What is CRC?

CRC stands for Cyclic redundancy check and describes a type of checksum calculation based on a polynomial. The CRC process consists of the sender producing a checksum from a set of data, which is generally the remainder of a division operation, and then using it as metadata to be checked against by a transmission receiver. A CRC is a checksum in a strict mathematical sense, as it can be expressed as the weighted modulo-2 sum of per-bit syndromes.

A CRC is called an n-bit CRC when its check value is n bits long. E.g. CRC-32 is a 32-bit CRC as its resulting value has a length of 32 bits. The simplest error-detection system, often thought in computer sciences classes, is the parity bit. In reality it is just a 1-bit CRC, CRC-1. The polynomial it uses is "x + 1" which has just two terms.

## How to calculate CRC?

CRC-8, CRC-16, and CRC-32 have similar computation algorithms. To compute an n-bit binary CRC, pad the input by n bits and line it with the n-bit divisor based on the chosen polynomial. Then iteratively divide the data by the n-bit divisor by positioning the divisor below the first 1 in the input. This is effectively bitwise XOR-ing and the bits not above the divisor remain unchanged on each step.

The CRC algorithm stops when the divident is equal to zero and thus the remainder equals exactly n bits. For CRC-8 this would be 8 bits. Respectively, it is 16 bits for CRC-16 and 32 bits for CRC-32.

## Practical Usage of the CRC 32 algorithm

CRCs like CRC-32 are often used to check that no errors occurred during data transmission and they work well for common types of errors on communication channels. A checksum is a quick and reasonable assurance of the integrity of messages delivered.

CRC calculations resemble long division in binary, except that the subtractions involved do not borrow from more significant digits, and thus become exclusive or operations (XORs). While cumbersome if done by hand, these operations are performed in hardware by bit-shifting and XORing making them extremely efficient.

### How checksums are usually used

The transmitted information is divided into slices of predetermined length which are then divided by a fixed divisor and the remainder of the calculation is appended onto and sent as metadata. The receiver computes the CRC of the data and if it does not match the received checksum, an error must have occurred during the transmission. A resend is usually requested at this point.

#### Cite this calculator & page

If you'd like to cite this online calculator resource and information as provided on the page, you can use the following citation:
Georgiev G.Z., "CRC Calculator", [online] Available at: https://www.gigacalculator.com/calculators/crc-calculator.php URL [Accessed Date: 29 May, 2022].