signed/unsigned in general is not a problem, except for the rightshift operator >> ... a right shift fills the left bits with whatever the original sign bit (leftmost bit) held... so if the number was negative, the bits will be all filled with 1's, but they should be filled with zeros instead (unsigned right shift).
|