Thanks Coulomb, I hadn't noticed that. Ernie, the XORing with the polynomial needs to be inside the loop, not outside. And it needs to be conditional on the value of the bit being shifted out of the working value. I think you want something like:
while (X<=63){
if ((Workingvalue &...