If [tex]x=-\frac12[/tex] is a zero, then [tex]p\left(-\frac12\right) = 0[/tex]. Solve this equation for [tex]a[/tex].
[tex]p\left(-\dfrac12\right) = 8\left(-\dfrac12\right)^3 - a\left(-\dfrac12\right)^2 - \left(-\dfrac12\right) + 2 = 0[/tex]
[tex]-1 - \dfrac a4 + \dfrac12 + 2 = 0[/tex]
[tex]-\dfrac a4 = -\dfrac32[/tex]
[tex]\boxed{a = 6}[/tex]