A molecule consisting of two atoms is called a diatomic molecule. Examples of diatomic molecules include hydrogen (H2), oxygen (O2), nitrogen (N2), and carbon monoxide (CO). Diatomic molecules are the simplest type of molecules and are formed when two atoms of the same or different elements are chemically bonded together.