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$ .
Answer: $\sqrt{10}$.
Solution: Let $2^{m}=t$, then $t>0$. The condition is equivalent to $t \cdot(t-1)+(-1) \cdot 2 t=0$, solving for $t$ gives $t=3$. Therefore, the magnitude of $\vec{a}$ is $\sqrt{3^{2}+(-1)^{2}}=\sqrt{10}$.