Considering how the function is already determined for irrationals, you only need to define it for rationals. Thus, the question is equivalent to asking the cardinality of the following set of functions:
$$S = \{f:\mathbb{Q} \to \{0, 1\}\}.$$
It is quite standard that the cardinality of $S$ is the same as that of the power set of $\mathbb{Q}$.
(Given a subset $A \subset \mathbb{Q}$, consider the function $\chi_A:\mathbb{Q} \to \{0, 1\}$ such that $\chi_A(q) = 1$ iff $q \in A$. The pairing $A \mapsto \chi_A$ is bijective which can be easily shown.)
It is also standard that the power set of $\mathbb{Q}$ has the same cardinality as that of $\mathbb{R}$. This means that your original intuition was wrong.
Moreover, it is not necessary to explicitly construct a bijection. You could appeal to Schröder–Bernstein theorem which tells you that it suffices to construct injections in both directions.
Also, considering how $|\mathbb{Q}| = |\mathbb{N}|$, it would be easier to work with $\mathbb{N}$ instead. You can find some answers here.