Hard x-ray photoemission spectroscopy (PES) of Cu core electronic states, with a probing depth of similar to 60 angstrom, is used to show that the Zhang-Rice singlet feature is present in La2CuO4 but is absent in Nd2CuO4. Hole and electron doping in La2-xSrxCuO4 (LSCO) and Nd2-xCexCuO4 (NCCO) result in new well-screened features which are missing in soft x-ray PES. Impurity Anderson model calculations establish screening from doped states as its origin, which is strongly suppressed within 15 angstrom of the surface. Complemented with x-ray absorption spectroscopy, the small chemical-potential shift in core levels (similar to 0.2 eV) are shown to be consistent with modifications of valence and conduction band states spanning the band gap (similar to 1 eV) upon hole and electron doping in LSCO and NCCO.