Implementing Hamming and maybe CRC in Java