Given that:
\[
\begin{aligned}
\text{Hard disk capacity} &= 512 \, \text{GB} = 2^9 \times 2^{30} = 2^{39} \, \text{Bytes},
\text{Number of surfaces} &= 32 = 2^5,
\text{Sectors per track} &= 4096 = 2^{12},
\text{Sector size (capacity)} &= 1024 = 2^{10} \, \text{Bytes},
\text{Number of cylinders} &= x.
\end{aligned}
\]
Substituting the values:
\[
2^{39} = 2^5 \times x \times 2^{12} \times 2^{10}.
\]
Simplifying:
\[
2^{39} = x \times 2^{12+10+5}.
\]
\[
2^{39} = x \times 2^{27}.
\]
\[
x = \frac{2^{39}}{2^{27}} = 2^{12} = 4096.
\]
Final Answer:
\[
\boxed{\text{4096 cylinders}}
\]