Bijection from $\{0,1\}^k \rightarrow P(\{1, ..., k\})$ $\{0,1\}^k \rightarrow P(\{1, ..., k\})$
I need this bijection.
I can see both sets have a cardinality of $2^k$, I also noticed that you can perform a (computer) AND-like operation using the bit string, $\{0,1\}^k$, as a mask, to get all the possible combinations of subsets, making for a bijection between the set of all bit-strings of length $k$, and the power set of positive integers up to $k$.
What I tried doing is this:
$$
I(k) = \{ x \in \mathbb{N}^1 : x \le k \} \\
b(x) = \{\ I(|x|)_i : i \in \mathbb{N}, i < |x|, x_i = 1\}
$$
I'm new to all of this notation, constructive criticism is appreciated - also, should the set-index, $i$, start at $0$ or $1$?
Does the combination of the functions $I$ and $b$ result in the bijection I desire?
How can it be improved / simplified?

I realised that the index $i$, within the $b$ function, is essentially the set returned by the function $I$, so have resorted to this:
$$b(x) = \{ i \in \mathbb{N}_1 : i \le |x|, x_i = 1 \}$$

View a sequence of zeros and ones from $\{0,1\}^k$ as a function $f:\{0,..,k\}\to\{0,1\}$. Then your bijection $\phi$ can be given via the preimage:
$$\{0,1\}^k\ni f\quad\mapsto\quad f^{-1}(1)\in\mathcal P(\{1,...,k\}).$$
Its inverse $\phi^{-1}$ can be given as
$$\mathcal P(\{1,...,k\})\ni X\quad\mapsto\quad f(i)=\begin{cases} 0&\text{for $i\not\in X$} \\ 1&\text{for $i\in X$}\end{cases}.$$
