Considering a binary coding. If we have a discrete variable X that varies inside the discrete set composed by k elements, we can map, for instance, this discrete variable into a 3 digit binary string. We require a string length that is called l. According to the expression, 2 to the power l must be greater equal than k.