2. If the planar vectors $\vec{a}=\left(2^{m},-1\right)$ and $\vec{b}=\left(2^{m}-1,2^{m+1}\right)$ are perpendicular, where $m$ is a real number, then the magnitude of $\vec{a}$ is . $\qquad$
$$
\vec{a} \cdot \vec{b}=2^{m}\left(2^{m}-1\right)-2^{m+1}=2^{2 m}-3 \cdot 2^{m}=0 \Rightarrow 2^{m}=3 \text {, }
$$

Thus $2^{m}=3 \Rightarrow \vec{a}=(3,-1) \Rightarrow|\vec{a}|=\sqrt{3^{2}+1}=\sqrt{10}$.