Showing the power set is equinumerous to ${}^X2$ I'm trying to prove that the power set of $X$ and the set of functions from $X$ to $2$ are equinumerous. I think the best way to do so is to define a bijection between the two, but I'm not sure how to construct such a function. How do I do this?
 A: As  you said a bijection between the powerset $\mathcal{P}(X)$ of a set $X$ and the set of functions from $X$ to $2:=\{0,1\}$ is precisely what we need.

We  start with a  small example. Let's consider $X=\{a,b,c\}$ and the set of subsets of $X$. We know there  are $2^{|X|}=2^3=8$  subsets  of  $X$ and we  encode each subset with the help of $0$ and $1$. We use $1$ to indicate if an element of $X$ is element of the subset and $0$ otherwise. 
We obtain
  \begin{array}{clc}
\mathcal{P}(X)\qquad\qquad&\qquad 2^X&a\ b\ c\\
\hline
\emptyset\qquad\qquad&\qquad f_{\emptyset}&0\ 0\ 0\\
\{a\}\qquad\qquad&\qquad f_{\{a\}}&1\ 0\ 0\\
\{b\}\qquad\qquad& \qquad f_{\{b\}}&0\ 1\ 0\\
\{c\}\qquad\qquad&\qquad f_{\{c\}}&0\ 0\ 1\\
\{a,b\}\qquad\qquad&\qquad f_{\{a,b\}}&1\ 1\ 0\\
\{a,c\}\qquad\qquad&\qquad f_{\{a,c\}}&1\ 0\ 1\\
\{b,c\}\qquad\qquad&\qquad f_{\{b,c\}}&0\ 1\ 1\\
\{a,b,c\}\qquad\qquad&\qquad f_{\{a,b,c\}}&1\ 1\ 1
\end{array}

We see there are $2^3=8$ different possibilities to specify for each subset $S\subset \{a,b,c\}$ a function $f_S$ with
\begin{align*}
&f_S:\{a,b,c\}\rightarrow \{0,1\}\\
&f_S(x)=
\begin{cases}
1\quad& x\in S\\
0\quad& x\not\in S
\end{cases}
\end{align*}
We generalise this situation and formulate a bijection as follows:

Bijection: For each subset $S\subset X$ we find a function $f_S:X\rightarrow \{0,1\}$ with
  \begin{align*}
f_S(x)=
\begin{cases}
1\qquad&\qquad x\in S\\
0\qquad&\qquad x\not\in S
\end{cases}
\end{align*}
on the other hand to each function $f:X\rightarrow \{0,1\}$ we specify a subset $T_f\subset X$ with
\begin{align*}
T_f=\{x\in X|f(x)=1\}
\end{align*}

A: Hint: Consider the function which associates to $f:X\rightarrow \{0,1\}$ the subset $X_f=\{x\in X, f(x)=1\}$
