What is this set representation of binary numbers called, when the set elements are positions where the digit are 1? Say I have $b = 010010$, then the set $S = \{2,5\}$ represents $b$ by  marking positions where the digit is $1$. Is there a name for this representation? How would I go about formally writing a function/transformation that converts all $b \rightarrow S$ or $S \rightarrow b$? Thank you!
 A: In some contexts like computation such representations are called "sparse", e.g. when representing (multivariate) polynomials.  Reason is that such representations are more (memory) efficient if the objects under consideration are sparsely populated.
Similar representations are used for (large, sparsely populated) matrices.
Assuming $b\in\Bbb N_0$, You can define
$$\begin{align}
S:\qquad \Bbb N_0 \quad&\to\quad 2^{\Bbb N_0} \\
\quad\sum_{i\geqslant 0}b_i2^i \quad&\mapsto\quad \{i\in\Bbb N_0 / b_i = 1\}
\end{align}$$
This function is well-defined because the binary representation exists and is unique.
If you want to extend it to all of $\Bbb R$, then negative numbers can be handled by representations that extend infinitely to the left, or more practical by allowing $S(b)$ to hold a special Symbol like "N" that denotes that the number is negative: $S:\Bbb R\to 2^{\Bbb Z\,\cup\,\{\text N\}}$.
In order for the representation to be well-defined, one has to exclude representations like $0.\bar 1$, so that the binary expansion remains unique.
A: In computer science, it is called a bit array, or bit map, bit set, bit string, or bit vector.
