CRC parameters
CRC reflection: RefIn and RefOut
Understand reflected input, reflected output, bit order, and the most common implementation mistakes.
7 min read
What RefIn means
RefIn specifies whether each input byte is processed least-significant bit first rather than most-significant bit first. Reflected implementations commonly shift the register in the opposite direction.
What RefOut means
RefOut describes the orientation of the final register relative to the model definition. It is not always an extra unconditional bit reversal after processing; the exact implementation depends on how the engine represents reflected state.
Avoid double reflection
A frequent bug is reflecting each byte, using a reflected polynomial and right-shifting engine, then reflecting the final value again without accounting for the engine convention. Validate against the published check value before trusting the result.
Try it in the calculator
Change CRC parameters and compare standard algorithm results using the browser-based calculator.