Answer
$$
\left(\frac{x}{2}\right)^{2}-\left(\frac{y}{\sqrt{12}}\right)^{2}=1.
$$
Work Step by Step
Since the foci are $(\pm 4,0)$ and $e=2$, then we have $c=4, e=\frac{c}{a}=\frac{4}{a}=2 $, and hence $a=2 $ and $b=\sqrt{c^2-a^2}=\sqrt{4^2-2^2}=\sqrt{12}$. Hence the equation of the hyperbola is given by
$$
\left(\frac{x}{2}\right)^{2}-\left(\frac{y}{\sqrt{12}}\right)^{2}=1.
$$