diff and auxdiff are now unsigned.
So it's not necessary to cast to unsigned int when using shift operator.