Standard test vector
CRC implementations are commonly verified with the ASCII input 123456789.
- Input format
- ASCII
- Input
- 123456789
- Expected CRC
- 0xBDF4
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
0x007F
Check
0x007F
Result
0xBDF4
Check
0xBDF4
Result
0x5D38
Check
0x5D38
Result
0x20FE
Check
0x20FE
Result
0xD0DB
Check
0xD0DB
/*
* Model: CRC-16 / LJ1200 (16-bit)
* Poly: 0x6F63, Init: 0x0000, XorOut: 0x0000
* CRC Table C Source Code & Lookup Table Generator
*/
#include <stdint.h>
#include <stddef.h>
const uint16_t crc_table[256] = {
0x0000, 0x6F63, 0xDEC6, 0xB1A5, 0xD2EF, 0xBD8C, 0x0C29, 0x634A,
0xCABD, 0xA5DE, 0x147B, 0x7B18, 0x1852, 0x7731, 0xC694, 0xA9F7,
0xFA19, 0x957A, 0x24DF, 0x4BBC, 0x28F6, 0x4795, 0xF630, 0x9953,
0x30A4, 0x5FC7, 0xEE62, 0x8101, 0xE24B, 0x8D28, 0x3C8D, 0x53EE,
0x9B51, 0xF432, 0x4597, 0x2AF4, 0x49BE, 0x26DD, 0x9778, 0xF81B,
0x51EC, 0x3E8F, 0x8F2A, 0xE049, 0x8303, 0xEC60, 0x5DC5, 0x32A6,
0x6148, 0x0E2B, 0xBF8E, 0xD0ED, 0xB3A7, 0xDCC4, 0x6D61, 0x0202,
0xABF5, 0xC496, 0x7533, 0x1A50, 0x791A, 0x1679, 0xA7DC, 0xC8BF,
0x59C1, 0x36A2, 0x8707, 0xE864, 0x8B2E, 0xE44D, 0x55E8, 0x3A8B,
0x937C, 0xFC1F, 0x4DBA, 0x22D9, 0x4193, 0x2EF0, 0x9F55, 0xF036,
0xA3D8, 0xCCBB, 0x7D1E, 0x127D, 0x7137, 0x1E54, 0xAFF1, 0xC092,
0x6965, 0x0606, 0xB7A3, 0xD8C0, 0xBB8A, 0xD4E9, 0x654C, 0x0A2F,
0xC290, 0xADF3, 0x1C56, 0x7335, 0x107F, 0x7F1C, 0xCEB9, 0xA1DA,
0x082D, 0x674E, 0xD6EB, 0xB988, 0xDAC2, 0xB5A1, 0x0404, 0x6B67,
0x3889, 0x57EA, 0xE64F, 0x892C, 0xEA66, 0x8505, 0x34A0, 0x5BC3,
0xF234, 0x9D57, 0x2CF2, 0x4391, 0x20DB, 0x4FB8, 0xFE1D, 0x917E,
0xB382, 0xDCE1, 0x6D44, 0x0227, 0x616D, 0x0E0E, 0xBFAB, 0xD0C8,
0x793F, 0x165C, 0xA7F9, 0xC89A, 0xABD0, 0xC4B3, 0x7516, 0x1A75,
0x499B, 0x26F8, 0x975D, 0xF83E, 0x9B74, 0xF417, 0x45B2, 0x2AD1,
0x8326, 0xEC45, 0x5DE0, 0x3283, 0x51C9, 0x3EAA, 0x8F0F, 0xE06C,
0x28D3, 0x47B0, 0xF615, 0x9976, 0xFA3C, 0x955F, 0x24FA, 0x4B99,
0xE26E, 0x8D0D, 0x3CA8, 0x53CB, 0x3081, 0x5FE2, 0xEE47, 0x8124,
0xD2CA, 0xBDA9, 0x0C0C, 0x636F, 0x0025, 0x6F46, 0xDEE3, 0xB180,
0x1877, 0x7714, 0xC6B1, 0xA9D2, 0xCA98, 0xA5FB, 0x145E, 0x7B3D,
0xEA43, 0x8520, 0x3485, 0x5BE6, 0x38AC, 0x57CF, 0xE66A, 0x8909,
0x20FE, 0x4F9D, 0xFE38, 0x915B, 0xF211, 0x9D72, 0x2CD7, 0x43B4,
0x105A, 0x7F39, 0xCE9C, 0xA1FF, 0xC2B5, 0xADD6, 0x1C73, 0x7310,
0xDAE7, 0xB584, 0x0421, 0x6B42, 0x0808, 0x676B, 0xD6CE, 0xB9AD,
0x7112, 0x1E71, 0xAFD4, 0xC0B7, 0xA3FD, 0xCC9E, 0x7D3B, 0x1258,
0xBBAF, 0xD4CC, 0x6569, 0x0A0A, 0x6940, 0x0623, 0xB786, 0xD8E5,
0x8B0B, 0xE468, 0x55CD, 0x3AAE, 0x59E4, 0x3687, 0x8722, 0xE841,
0x41B6, 0x2ED5, 0x9F70, 0xF013, 0x9359, 0xFC3A, 0x4D9F, 0x22FC
};
uint16_t calculate_crc(const uint8_t *data, size_t length) {
uint16_t crc = 0x0000;
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/LJ1200 is used by the LJ1200 amateur packet-radio telemetry protocol.
CRC-16/LJ1200 is a 16-bit CRC model defined by polynomial 0x6F63, an initial register value of 0x0000, and final XOR 0x0000. It uses normal, non-reflected input and output processing.
Documented application context for this model includes LJ1200, Amateur packet radio, Telemetry links. 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 | 0x6F63 | Generator polynomial without the leading term | Read guide |
| Init | 0x0000 | 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 | 0xBDF4 | CRC of ASCII “123456789” | Read guide |
| Residue | Not listed | Expected residue after appending a valid CRC | Read guide |
For the standard ASCII test input 123456789, the check value of CRC-16/LJ1200 is 0xBDF4.
CRC-16/LJ1200 uses the 16-bit polynomial 0x6F63.
For CRC-16/LJ1200, RefIn is No and RefOut is No.
The closest published model by parameter overlap is CRC-16/DECT-X, differing from CRC-16/LJ1200 in polynomial.