Let A be a set , prove that $|\{f|f:A\rightarrow \{0,1\}\}|=|P(A)|$
I tried to prove that $g:|\{f|f:A\rightarrow \{0,1\}\}|\rightarrow |P(A)|$ is one to one and onto
but I didn't find the right function and I don't know how to find cardinality of functions
thoughts?