>I need to attach checksums to strings outgoing, and check checksums attached >to strings received. For Error Detection purposes, I assume. You're concerned about bit errors, error bursts, etc. (is it a noisey link or a relatively good link?) >The checksum being the sum of all the data '1' s in the bytes of the string. You sure? Folks typically say "checksum" to mean all kinds of things, including CRC. Your above method is simple algorithmically, but won't catch all kinds of burst errors, or even double bit errors spaced out. Many of us can pass you CRC algorithms, if you need CRC.