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 \}$$

Hint:
The simplest way to obtain a bijection between $\{0,1\}^k$ and $P(1,2,...,k)$ is to map 
$$(x_1,...,x_k) \mapsto \{i : x_i = 1\}.$$
I'll leave the rest to you (i.e to prove that this is a bijection).
Hope this helps - feel free to ask for clarification.
