This question has been asked several times:
The set of all functions from $\mathbb{N} \to \{0, 1\}$ is uncountable?
The set of all functions from $\mathbb{N} \to \{0, 1\}$ is uncountable?
I just had some follow-up questions that I didn't understand. For the first one it says to supposed that $g: \Bbb{N} \rightarrow \{0,1\}$ is a bijection, define $b(k) = 1 - g(k)(k)$, then $b(k)$ is not in the image of $g(k)$ by the ways its constructed but I don't understand why $b(k)$ is an element of $2^{\Bbb{N}}$, I understand that $g(k)$ will evaluate to $0$ or $1$ but $g(k)(k)$ is not necessarily one or zero, it could be $g(20)(20) = 1*20 = 20$ for example.
For the second question, it says to show that $F(f) = \{ n \in \Bbb{N} : f(n) = 1\}$ is a bijection $F(f): 2^{\Bbb{N}} \rightarrow P(\Bbb{N})$. I can see how the function is surjective, since by construction for every $n \in \Bbb{N} \ \exists f(n) \in 2^{\Bbb{N}}$ s.t. $f(n) = 1$, but I can not see how $F(f(n))$ is injective, if $f(n) = 0$, then that $n$ doesn't get mapped into $\Bbb{N}$, in this case wouldn't $F(f(n))$ just be the empty set, suppose for a certain $n \in \Bbb{N}$ there exists not function $f$, s.t. $f(n) = 1$, then wouldn't that n never be in $P(\Bbb{N})$.
Thanks in advance