The surface states of diamond and two-dimensional graphite are investigated on the assumption that the delimitation of the crystal causes no perturbation within the elementary cells of the finite crystal. In both cases a plane perpendicular to the bond between a selected pair of carbon atoms is taken as the delimiting plane. The molecular orbitals are assumed in the form of a linear combination of sp3 or sp2 hybrids. In the case of graphite, molecular orbitals that are linear combinations of 2pz orbitals, whose interaction with sp2 hybrids is neglected, are further considered. It appears that in the case of diamond there exists a band of energies pertaining to Shockley surface states in the gap between the valence and conductivity bands. The number of atoms in this band equals the number of atoms in the surface. From a discussion of the pertinent wave functions, it follows that these states are an expression of unsaturated bonds of the surface carbon atoms. The electron density on the hybrids projecting from the surface is essentially greater than the density on the other hybrids of the surface atoms. Further bands of surface states exist in the region of energies allowed for the volume valence and the conductivity states. In graphite, a quite analogous behavior is shown by those surface states whose wave functions are linear combinations of sp2 orbitals. Surface states whose wave functions are linear combinations of pz orbitals are a manifestation of unsaturated double bonds of surface atoms having only two neighbors. The analogy between these Shockley states and the nonbonding states of odd alternant aromatic hydrocarbons is pointed out.