  X-ray diffraction multipole refinements of single-crystalline
Mg$_x$Al$_{1-x}$B$_2$ and polarization-dependent near-edge x-ray absorption
fine structure at the B 1$s$ edge reveal a strongly anisotropic electronic
structure. Comparing the data for superconducting compounds ($x= 0.8$, 1.0)
with those for the non-superconductor ($x=0$) gives direct evidence for a
rearrangement of the hybridizations of the boron $p_z$ bonds and underline the
importance of holes in the $\sigma$-bonded covalent $sp^2$ states for the
superconducting properties of the diborides. The data indicate that Mg is
approximately divalent in MgB$_2$ and suggest predominantly ionic bonds between
the Mg ions and the two-dimensional B rings. For AlB$_2$ ($x=0$), on the other
hand, about 1.5 electrons per Al atom are transferred to the B sheets while the
residual 1.5 electrons remain at the Al site which suggests significant
covalent bonding between the Al ions and the B sheets. This finding together
with the static electron deformation density points to almost equivalent
electron counts on B sheets of MgB$_2$ and AlB$_2$\@, yet with a completely
different electron/hole distribution between the $\sigma$ and $\pi$ bonds.
