Electronic configuration:
Carbon is in the 2nd row of the periodic table and has six electrons that will fill up the lower energy atomic orbitals first. This is termed as the aufbau principle. The 1s orbital is filled up before the 2s orbital that is filled up previous to the 2p orbitals. The Exclusion Principle of Pauli says that each orbital is permitted a maximum of two electrons and that these electrons must contain opposite spins. Hence, the first four electrons fill up the 1s and 2s orbitals. The electrons within each orbital have opposite spins and this is presented in the below figure by drawing the arrows pointing up or down. There are two electrons left to fit in the remaining 2p orbitals. These go into separate orbitals like that there are two half-filled orbitals and one empty orbital. When there are orbitals of equivalent energy, electrons will only begin to pair up once all the degenerate orbitals are half filled. This is termed as Hund's rule.
Figure: Electronic con?guration for carbon
For carbon the electronic configuration is 1s2 2s2 2px1 2py1. The numbers in superscript consider to the numbers of electrons within each orbital. The letters consider to the types of atomic orbital included and the numbers in front refer to which shell the orbital belongs.