  The quantitative evaluation of the carbon hybridization state by X-ray
photoelectron spectroscopy (XPS) has been a surface-analysis problem for the
last three decades due to the challenges associated with the unambiguous
identification of the characteristic binding energy values for sp$^2$ and
sp$^3$-bonded carbon. While the sp$^2$ binding energy is well established,
there is disagreement for the sp$^3$ value in the literature. Here, we compute
the binding energy values for model structures of pure and doped-diamond using
density functional theory. The simulation results indicate that the large
band-gap of diamond allows defects to pin the Fermi level, which results in
large variations of the C(1s) core electron energies for sp$^3$-bonded carbon,
in agreement with the broad range of experimental C(1s) binding energy values
for sp$^3$ carbon reported in the literature. Fermi level pinning by boron is
demonstrated by experimental C(1s) binding energies of highly B-doped
ultrananocrystalline diamond that are in good agreement to simulations.
