Search code examples
hashchecksumintegrity

Is there a 2 or 3-bit checksum algorithm


Is there a 2 or 3 bit checksum algorithm that I can use to check my 6 bits of data for errors which I am reading in from an optical sensor that detects 8 bit patterns? I was not able to find anything.


Solution

  • You can xor the first three bits with the second ones and append the result, then xor them again to check it on the other side.