Standard test vector
CRC implementations are commonly verified with the ASCII input 123456789.
- Input format
- ASCII
- Input
- 123456789
- Expected CRC
- 0x4C06
- Residue
- 0x0000
Result is calculated from the current input. Check is the published verification value for the standard input 123456789. Click another algorithm to view its detail page.
Result
0x4C06
Check
0x4C06
Result
0xAEE7
Check
0xAEE7
Result
0x9ECF
Check
0x9ECF
Result
0x29B1
Check
0x29B1
Result
0x772B
Check
0x772B
/*
* Model: CRC-16 / CDMA2000 (16-bit)
* Poly: 0xC867, Init: 0xFFFF, XorOut: 0x0000
* CRC Table C Source Code & Lookup Table Generator
*/
#include <stdint.h>
#include <stddef.h>
const uint16_t crc_table[256] = {
0x0000, 0xC867, 0x58A9, 0x90CE, 0xB152, 0x7935, 0xE9FB, 0x219C,
0xAAC3, 0x62A4, 0xF26A, 0x3A0D, 0x1B91, 0xD3F6, 0x4338, 0x8B5F,
0x9DE1, 0x5586, 0xC548, 0x0D2F, 0x2CB3, 0xE4D4, 0x741A, 0xBC7D,
0x3722, 0xFF45, 0x6F8B, 0xA7EC, 0x8670, 0x4E17, 0xDED9, 0x16BE,
0xF3A5, 0x3BC2, 0xAB0C, 0x636B, 0x42F7, 0x8A90, 0x1A5E, 0xD239,
0x5966, 0x9101, 0x01CF, 0xC9A8, 0xE834, 0x2053, 0xB09D, 0x78FA,
0x6E44, 0xA623, 0x36ED, 0xFE8A, 0xDF16, 0x1771, 0x87BF, 0x4FD8,
0xC487, 0x0CE0, 0x9C2E, 0x5449, 0x75D5, 0xBDB2, 0x2D7C, 0xE51B,
0x2F2D, 0xE74A, 0x7784, 0xBFE3, 0x9E7F, 0x5618, 0xC6D6, 0x0EB1,
0x85EE, 0x4D89, 0xDD47, 0x1520, 0x34BC, 0xFCDB, 0x6C15, 0xA472,
0xB2CC, 0x7AAB, 0xEA65, 0x2202, 0x039E, 0xCBF9, 0x5B37, 0x9350,
0x180F, 0xD068, 0x40A6, 0x88C1, 0xA95D, 0x613A, 0xF1F4, 0x3993,
0xDC88, 0x14EF, 0x8421, 0x4C46, 0x6DDA, 0xA5BD, 0x3573, 0xFD14,
0x764B, 0xBE2C, 0x2EE2, 0xE685, 0xC719, 0x0F7E, 0x9FB0, 0x57D7,
0x4169, 0x890E, 0x19C0, 0xD1A7, 0xF03B, 0x385C, 0xA892, 0x60F5,
0xEBAA, 0x23CD, 0xB303, 0x7B64, 0x5AF8, 0x929F, 0x0251, 0xCA36,
0x5E5A, 0x963D, 0x06F3, 0xCE94, 0xEF08, 0x276F, 0xB7A1, 0x7FC6,
0xF499, 0x3CFE, 0xAC30, 0x6457, 0x45CB, 0x8DAC, 0x1D62, 0xD505,
0xC3BB, 0x0BDC, 0x9B12, 0x5375, 0x72E9, 0xBA8E, 0x2A40, 0xE227,
0x6978, 0xA11F, 0x31D1, 0xF9B6, 0xD82A, 0x104D, 0x8083, 0x48E4,
0xADFF, 0x6598, 0xF556, 0x3D31, 0x1CAD, 0xD4CA, 0x4404, 0x8C63,
0x073C, 0xCF5B, 0x5F95, 0x97F2, 0xB66E, 0x7E09, 0xEEC7, 0x26A0,
0x301E, 0xF879, 0x68B7, 0xA0D0, 0x814C, 0x492B, 0xD9E5, 0x1182,
0x9ADD, 0x52BA, 0xC274, 0x0A13, 0x2B8F, 0xE3E8, 0x7326, 0xBB41,
0x7177, 0xB910, 0x29DE, 0xE1B9, 0xC025, 0x0842, 0x988C, 0x50EB,
0xDBB4, 0x13D3, 0x831D, 0x4B7A, 0x6AE6, 0xA281, 0x324F, 0xFA28,
0xEC96, 0x24F1, 0xB43F, 0x7C58, 0x5DC4, 0x95A3, 0x056D, 0xCD0A,
0x4655, 0x8E32, 0x1EFC, 0xD69B, 0xF707, 0x3F60, 0xAFAE, 0x67C9,
0x82D2, 0x4AB5, 0xDA7B, 0x121C, 0x3380, 0xFBE7, 0x6B29, 0xA34E,
0x2811, 0xE076, 0x70B8, 0xB8DF, 0x9943, 0x5124, 0xC1EA, 0x098D,
0x1F33, 0xD754, 0x479A, 0x8FFD, 0xAE61, 0x6606, 0xF6C8, 0x3EAF,
0xB5F0, 0x7D97, 0xED59, 0x253E, 0x04A2, 0xCCC5, 0x5C0B, 0x946C
};
uint16_t calculate_crc(const uint8_t *data, size_t length) {
uint16_t crc = 0xFFFF;
for (size_t i = 0; i < length; i++) {
#if 0
uint8_t idx = (uint8_t)(crc ^ data[i]);
crc = (crc >> 8) ^ crc_table[idx];
#else
uint8_t idx = (uint8_t)((crc >> 8) ^ data[i]);
crc = (crc << 8) ^ crc_table[idx];
#endif
}
return crc ^ 0x0000;
}CRC-16/CDMA2000 is a 16-bit CRC used in CDMA2000 mobile systems.
CRC-16/CDMA2000 is a 16-bit CRC model defined by polynomial 0xC867, an initial register value of 0xFFFF, and final XOR 0x0000. It uses normal, non-reflected input and output processing.
Documented application context for this model includes CDMA2000, Mobile networks, Telecommunications. The calculator above applies this exact parameter set to the current input; the published Check value below is instead the fixed verification result for ASCII 123456789.
CRC implementations are commonly verified with the ASCII input 123456789.
A model is identified by its complete parameter set, not its polynomial alone.
Continue with the main calculator, browse the algorithm catalog, compare models in the Algorithm Reference section, or generate a lookup table.
| Parameter | Value | Meaning | Reference |
|---|---|---|---|
| Width | 16 bits | CRC register and result width | Read guide |
| Poly | 0xC867 | Generator polynomial without the leading term | Read guide |
| Init | 0xFFFF | Initial CRC register value | Read guide |
| RefIn | No | Reflect each input byte before processing | Read guide |
| RefOut | No | Reflect the register before XOR Out | Read guide |
| XorOut | 0x0000 | Final value XORed with the CRC register | Read guide |
| Check | 0x4C06 | CRC of ASCII “123456789” | Read guide |
| Residue | 0x0000 | Expected residue after appending a valid CRC | Read guide |
For the standard ASCII test input 123456789, the check value of CRC-16/CDMA2000 is 0x4C06.
CRC-16/CDMA2000 uses the 16-bit polynomial 0xC867.
For CRC-16/CDMA2000, RefIn is No and RefOut is No.
The closest published model by parameter overlap is CRC-16/CMS, differing from CRC-16/CDMA2000 in polynomial.