I want to generate $n$-bit binary numbers $x_i$ , but i do not want to do the loop of decisions by 2 for each $x_i$. I think there is should be a recursive way of generating the binary representation vector for $x_i$ based on previous indices of $i$.
Or if there is another way to directly calculate $x_{i,d}$ as the $d$-th digit of $x_i$ ?
I think this is one way to recursively phrase it: $$ x_{i,d}= \begin{cases} \neg{x_{{i-1},d}} & \text{if } (x_{{i-1},{d-1}}=1 \wedge x_{{i},{d-1}}=0) \vee (d=1) \\ x_{{i-1},{d}} & \text{otherwise} \end{cases} $$
Assuming $d=1$ is the smallest digit and $x_1$ is a $n$-bit binary vector of zeros.