CNT_s are one of the most significant achievements of nano-technology with important applications in the design of electronic nano-devices. The study of their properties is therefore important. Here the DFT method is utilized to study the adsorption of oxygen and nitrogen molecules on the surface of (4, 4) SWCNT. The electronic structure, dipole moment of nitrogen, oxygen and carbon nuclei's are thoroughly studied. Optimization of primary nanotubes which included the exchange of NMR parameters of carbon which was connected to oxygen and nitrogen molecules was studied. Then, adsorption of oxygen and nitrogen molecules on armchair SWCNT_s (4, 4) was investigated. The computational results indicate that rich adsorption patterns may result from the interaction of oxygen and nitrogen with the CNT_s. Sometimes, C-O bounds are formed via breaking C-C bonds and sometimes a carbon atom is replaced with an oxygen atom. Sometimes molecular oxygen and nitrogen molecular are attracted by a C-C bound. Finally, the optimized adsorption rates are calculated. This study performed by using DFT and Gaussian 98 softwares.