Consider the function $f\colon\mathbb{Z}\times\{0,1\}\rightarrow \mathbb{Z}$ defined by: $$ f(n,m)=n+2^m. $$
For injective: Let $f(a,b)=f(c,d)$. Therefore, $a+2^b=c+2^d$.
I am unsure how to prove surjectivity and to how to prove the rest of my injective proof.
Injectivity:
Suppose $a+2^b=c+2^d$ and $b \ne d$. We can assume (symmetry) that $b = 0$ and $d = 1$. Then
$\quad a+1=c+2$
So we have, for example, $f(1,0) = f(0,1) = 2$ and $f$ is not injective.
Surjectivity:
Solve
$\quad a+2^b = n$.
OK,
$\quad f(n-1, 0) = n$
and so $f$ is surjective.