I am having difficulty understanding the answer to this question.
How many functions are there with domain $A$ and codomain $\{0, 1\}$?
$A = P(\{1, 2, 3, 4\})$.
$|A| = 2^{|{1,2,3,4}|} = 16$, so there are $16$ possible inputs. For each of these inputs, we can choose whether to map them to $0$ or $1$. So there are $2^{16} = 65536$ such functions.
I understand the first part ($2^4=16$), but the second part ($2^{16}$) is a little bit confusing to me.
The size of $A$ is the number of subsets that you can create with the $4$ elements $A$ has, you can choose to use or not and element, since you got $4$ elements there are $4$ chooses of put or not to be made: $|A| = 2^4 = 16$. Now to count the functions from $A$ to ${0,1}$ just think that we need to associate an image to each element of $A$ and we have $2$ possible imagens. Enumerate the sets of $A$, choose an image to the first set (2 choices), than choose an image to the second set (times 2 choices from the multiplication rule), keep going and you will end in $2^{16}$.