Finding a correspondence between $\{0,1\}^A$ and $\mathcal P(A)$ I got this question in homework:

Let $\{0,1\}^A$ the set of all functions from A (not necessarily a finite set)
      to $\{0,1\}$. Find a correspondence (function) between $\{0,1\}^A$ and
      $\mathcal P(A)$ (The power set of $A$).
      Prove that this correspondence is one-to-one and onto.

I don't know where to start, so I need a hint. What does it mean to find a correspondence?
I'm not really supposed to define a function, right? 
I guess once I have the correspondence defined somehow, the proof will be easier.
Any ideas? Thanks!

I'll try to say this without all the technicalities that accompany some of the earlier answers.
Let $B$ be a member of $\mathcal{P}(A).$
That means $B\subseteq A$.
You want to define a function $f$ corresponding to the set $B$.  If $x\in A$, then what is $f(x)$?  It is: $f(x)=1$ if $x\in B$ and $f(x) = 0$ if $x\not\in B$.
After that, you need to show that this correspondence between $B$ and $f$ is really a one-to-one correspondence between the set of all subsets of $A$ and the set of all functions from $A$ into $\{0,1\}$.  If has to be "one-to-one in both directions"; i.e. you need to check both, and you need to check that the word "all" is correct in both cases.
