I havent program for a will ^^ check this site koders.com
Also I think u can do this whit a mask. The way I would to this would be to transform the 6 digit in binary if there not already then make and HEX value. If I assume you 6 digit are binary 0 and 1, I would had 2 zero or 11 at the end making 2 pair of 4 binary. Those can be transform in HEX very easy then add them to make the check sum in hex. U could then transmit the information in ASCII caracter in your network retrived the last letter or 2 last and use the reverse fonction to check the 2 first letter. Now if 1 bit got corrupted, the ASCII caracter will change. Also u can print the ASCII to trouble shoot problem and compare input output. Now if your digit are in fact number on a logic circuit it's the same process cause each digit has an hex equivalent. U just have to know if u need 1,2or4 hex for each digit. I hope this help.
