Tools
aa497.txt
Associated article: Understanding CRCs
Tags: Tools
Published source code accompanying Tim Kientzle's article on the cyclic redundancy check (CRC) error-detecting signature.
Algorithm Alley
by Tim Kientzle
Listing One
short BitwiseCrc16(int bit, short crc) {
long longcrc = crc;
longcrc = (longcrc << 1) ^ bit; /* next bit */
if (longcrc & 0x10000)
longcrc ^= 0x11021; /* reduce */
return(longcrc & 0xFFFF);
}
Listing Two
short BitwiseCrc16(int bit, ...


