Standard test vector
CRC implementations are commonly verified with the ASCII input 123456789.
- Input format
- ASCII
- Input
- 123456789
- Expected CRC
- 0x007F
- 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
0x007E
Check
0x007E
Result
0x007F
Check
0x007F
Result
0x5D38
Check
0x5D38
Result
0x20FE
Check
0x20FE
Result
0xD0DB
Check
0xD0DB
/*
* Model: CRC-16 / DECT-X (16-bit)
* Poly: 0x0589, 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, 0x0589, 0x0B12, 0x0E9B, 0x1624, 0x13AD, 0x1D36, 0x18BF,
0x2C48, 0x29C1, 0x275A, 0x22D3, 0x3A6C, 0x3FE5, 0x317E, 0x34F7,
0x5890, 0x5D19, 0x5382, 0x560B, 0x4EB4, 0x4B3D, 0x45A6, 0x402F,
0x74D8, 0x7151, 0x7FCA, 0x7A43, 0x62FC, 0x6775, 0x69EE, 0x6C67,
0xB120, 0xB4A9, 0xBA32, 0xBFBB, 0xA704, 0xA28D, 0xAC16, 0xA99F,
0x9D68, 0x98E1, 0x967A, 0x93F3, 0x8B4C, 0x8EC5, 0x805E, 0x85D7,
0xE9B0, 0xEC39, 0xE2A2, 0xE72B, 0xFF94, 0xFA1D, 0xF486, 0xF10F,
0xC5F8, 0xC071, 0xCEEA, 0xCB63, 0xD3DC, 0xD655, 0xD8CE, 0xDD47,
0x67C9, 0x6240, 0x6CDB, 0x6952, 0x71ED, 0x7464, 0x7AFF, 0x7F76,
0x4B81, 0x4E08, 0x4093, 0x451A, 0x5DA5, 0x582C, 0x56B7, 0x533E,
0x3F59, 0x3AD0, 0x344B, 0x31C2, 0x297D, 0x2CF4, 0x226F, 0x27E6,
0x1311, 0x1698, 0x1803, 0x1D8A, 0x0535, 0x00BC, 0x0E27, 0x0BAE,
0xD6E9, 0xD360, 0xDDFB, 0xD872, 0xC0CD, 0xC544, 0xCBDF, 0xCE56,
0xFAA1, 0xFF28, 0xF1B3, 0xF43A, 0xEC85, 0xE90C, 0xE797, 0xE21E,
0x8E79, 0x8BF0, 0x856B, 0x80E2, 0x985D, 0x9DD4, 0x934F, 0x96C6,
0xA231, 0xA7B8, 0xA923, 0xACAA, 0xB415, 0xB19C, 0xBF07, 0xBA8E,
0xCF92, 0xCA1B, 0xC480, 0xC109, 0xD9B6, 0xDC3F, 0xD2A4, 0xD72D,
0xE3DA, 0xE653, 0xE8C8, 0xED41, 0xF5FE, 0xF077, 0xFEEC, 0xFB65,
0x9702, 0x928B, 0x9C10, 0x9999, 0x8126, 0x84AF, 0x8A34, 0x8FBD,
0xBB4A, 0xBEC3, 0xB058, 0xB5D1, 0xAD6E, 0xA8E7, 0xA67C, 0xA3F5,
0x7EB2, 0x7B3B, 0x75A0, 0x7029, 0x6896, 0x6D1F, 0x6384, 0x660D,
0x52FA, 0x5773, 0x59E8, 0x5C61, 0x44DE, 0x4157, 0x4FCC, 0x4A45,
0x2622, 0x23AB, 0x2D30, 0x28B9, 0x3006, 0x358F, 0x3B14, 0x3E9D,
0x0A6A, 0x0FE3, 0x0178, 0x04F1, 0x1C4E, 0x19C7, 0x175C, 0x12D5,
0xA85B, 0xADD2, 0xA349, 0xA6C0, 0xBE7F, 0xBBF6, 0xB56D, 0xB0E4,
0x8413, 0x819A, 0x8F01, 0x8A88, 0x9237, 0x97BE, 0x9925, 0x9CAC,
0xF0CB, 0xF542, 0xFBD9, 0xFE50, 0xE6EF, 0xE366, 0xEDFD, 0xE874,
0xDC83, 0xD90A, 0xD791, 0xD218, 0xCAA7, 0xCF2E, 0xC1B5, 0xC43C,
0x197B, 0x1CF2, 0x1269, 0x17E0, 0x0F5F, 0x0AD6, 0x044D, 0x01C4,
0x3533, 0x30BA, 0x3E21, 0x3BA8, 0x2317, 0x269E, 0x2805, 0x2D8C,
0x41EB, 0x4462, 0x4AF9, 0x4F70, 0x57CF, 0x5246, 0x5CDD, 0x5954,
0x6DA3, 0x682A, 0x66B1, 0x6338, 0x7B87, 0x7E0E, 0x7095, 0x751C
};
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/DECT-X is the companion DECT CRC model with zero final XOR.
CRC-16/DECT-X is a 16-bit CRC model defined by polynomial 0x0589, 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 DECT, Cordless telephony, Wireless protocols. 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 | 0x0589 | 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 | 0x007F | 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/DECT-X is 0x007F.
CRC-16/DECT-X uses the 16-bit polynomial 0x0589.
For CRC-16/DECT-X, RefIn is No and RefOut is No.
CRC-16/DECT-R uses the same polynomial (0x0589), which is the usual source of mix-ups — matching the polynomial alone does not reproduce CRC-16/DECT-X. The two models differ in final XOR value, so a port from one to the other needs those fields checked explicitly, not just the poly.