"Anybody here know of a 16-bit..." <- > <@diondokter:matrix.org> Anybody here know of a 16-bit CRC type thing that doesn't output 0 or 0xFFFF as a valid result? > > This is to store checksums in flash and I need to be able to detect 0xFFFF for 'no checksum written here', 0 for 'checksum was erased' and any other value for 'this is a valid checksum'. > > I could take a `(crc_u16 % 0xFFFD) + 1`, but then number value 1 and 2 have double the collision chance. > Maybe that's fine, idk... what you'd need is a 15.999956-bit checksum, I don't think those exist - either store more than 16 bits to mark your extra states, or use a <16 bit checksum