adapted for unsigned shl
fixed comments
clarified comments