combining CRCs

combining CRCs

If I have CRCs for 2 blocks of data, is it practical to compute the CRC
for the combined block.

combining CRCs

Quote:>If I have CRCs for 2 blocks of data, is it practical to compute the CRC
>for the combined block.

Yes, CRC's are just the block modulo the CRC polynomial.
So you can combine two of them in the obvious way.

combining CRCs

>> If I have CRCs for 2 blocks of data, is it practical to compute the CRC
>> for the combined block.

> Yes, CRC's are just the block modulo the CRC polynomial.
> So you can combine two of them in the obvious way.

You have to adjust for things like preset to -1 and inverting
the final output, but before such complications are added,
CRC(a XOR b) = CRC(a) XOR CRC(b).

To deal with the CRC of blocks that are appended to each other,
you have to realize that a CRC considers a message as a
polynomial in x, where the bits are the coefficients.
I.e. you're sending m(x).  The CRC has a ganerator polynomial
p(x) of degree n, and CRC(m) = m(x)*x^n % p(x), where %
is the modulo remainder.

If you have a second message m'(x) which you want to prepend to the first,
then you need to find the length k of the first message and
compute CRC(m'm) = (m'(x)*x^(n+k) + m(x)*x^n) % p(x).

This can be converted to

CRC(m'm) = (CRC(m') * x^k + CRC(m)) % p(x).
Remembering that adding CRCs is actually done by XORing them, all you
need to do is to "shift" the CRC of m' by k positions, then you
can XOR it with the CRC of m.

The details aren't that hard to work out, although you won't find
polynomail multiplcation in the usual example CRC code.
--
-Colin

Hi, everyone.

As you know
CRC-16 = x^16 + x^15 + x^2 + 1.
CRC-CCITT = x^16 + x^12 + x^5 +1.
BCH code => Various generator polynominals

My questions are as follows..

1. Could you show me some cases of these kinds of situation?

2. How exact each method can detect these kinds of erranous situation

in the 'normal'communication environment?

(Statistical data is much favored..)

For example:
For CRC-16-> single bit error : ?(%)
double bit error : ?(%)
Odd number bit error : ?(%)
(Various kind of)burst error : ?(%)