Compute next value with the same number of bits set.