Why $\sqrt{\left(\frac{-\sqrt3}2\right)^2+{(\frac12)}^2}$ is equal to 1? $\sqrt{\left(\frac{-\sqrt3}2\right)^2+{(\frac12)}^2}$

By maths calculator it results 1.
I calculate and results $\sqrt{-\frac{1}{2}}$.
$\sqrt{\left(\frac{-\sqrt3}2\right)^2+{(\frac12)}^2}$
$\sqrt{\frac{-{(3)}^{{\displaystyle\frac12}\times2}}{2^2}+\frac{1^2}{2^2}}=\sqrt{\frac{-3}4+\frac14}=\sqrt{\frac{-3+1}4}=\sqrt{\frac{-2}4}=\sqrt{-\frac12}$
Enlighten me what went wrong?

Hint:$(-\sqrt{3})^2=(-1)^2(3)^{{\frac{1}{2}}2}=3$
