Nitrogen oxides are textbook class of molecular compounds, with extensive industrial applications. Nitrogen and oxygen are also among the most abundant elements in the universe. We explore the N-O system at 0K and up to 500GPa though ab initio evolutionary simulations. Results show that two phase transformations of stable molecular NO2 occur at 7 and 64GPa, and followed by decomposition of NO2 at 91GPa. All of the NO+NO3- structures are found to be metastable at T=0K, so experimentally reported ionic NO+NO3- is either metastable or stabilized by temperature. N2O5 becomes stable at 9 GPa, and transforms from P-1 to C2/c structure at 51GPa. NO becomes thermodynamically stable at 198GPa. This polymeric phase is superconducting (Tc=2.0K) and contains a -N-N- backbone.