In the formation of methane, CH4 molecule, carbon contributes 4 electrons, (one electron to each hydrogen atom) and 4 hydrogen atoms contribute one electron each. Thus in CH4 molecule, there are four C – H covalent bonds as shown below:
In ammonia molecule, three N – H single covalent bonds are present. Electron configuration of 7 N is 2, 5 and 1 H is 1. Nitrogen atom contributes three electrons for bonding. Three hydrogen atoms at the same time contribute one electron each for bonding. Six electrons form three pairs and each pair is shared between nitrogen and one hydrogen atom as shown below: