Break the loop once the result can no longer change.
Negation not needed anymore.
Merge pull request #353 from Dmitry-Me/breakLoopEarlyInsteadOfContinuingBitwiseAnd

Break the loop once the result can no longer change.