  We describe the construction and operation of an x-ray beam size monitor
(xBSM), a device measuring $e^+$ and $e^-$ beam sizes in the CESR-TA storage
ring using synchrotron radiation. The device can measure vertical beam sizes of
$10-100~\mu$m on a turn-by-turn, bunch-by-bunch basis at $e^\pm$ beam energies
of $\sim2~$GeV. At such beam energies the xBSM images x-rays of
$\epsilon\approx$1-10$~$keV ($\lambda\approx 0.1-1$ nm) that emerge from a
hard-bend magnet through a single- or multiple-slit (coded aperture) optical
element onto an array of 32 InGaAs photodiodes with 50$~\mu$m pitch. Beamlines
and detectors are entirely in-vacuum, enabling single-shot beam size
measurement down to below 0.1$~$mA ($2.5\times10^9$ particles) per bunch and
inter-bunch spacing of as little as 4$~$ns. At $E_{\rm b}=2.1 $GeV, systematic
precision of $\sim 1~\mu$m is achieved for a beam size of $\sim12~\mu$m; this
is expected to scale as $\propto 1/\sigma_{\rm b}$ and $\propto 1/E_{\rm b}$.
Achieving this precision requires comprehensive alignment and calibration of
the detector, optical elements, and x-ray beam. Data from the xBSM have been
used to extract characteristics of beam oscillations on long and short
timescales, and to make detailed studies of low-emittance tuning, intra-beam
scattering, electron cloud effects, and multi-bunch instabilities.
