transforming the vectors of length K into a number in the base 2 for
