I have the following data structure: x = upper bound of log(n+1) which is the bits that we need for binary representation of n. For example for n = 13
x = upper bound of log(n+1)
n = 13