Use bitshift instead of multiply for performance