Small speed increase by checking all digits at once with bitwise AND with a precalculated flag