Binary-type nomenclature can be extended beyond simple stoichiometric names. Let’s have a look at the compound with empirical formula HKO. If we were trying to come up with purely stoichiometric name, it would be either potassium hydride oxide or hydrogen potassium oxide, but nobody calls it that. Moreover, it is customary to write its formula not like I did (with element symbols ordered alphabetically), but KOH. Why? Because it is known that KOH is an ionic compound which will dissociate in water into cations K+ and anions OH−. Attention please: we have just zoomed from (macroscopic) compound to (microscopic) molecular entities.
So we’ve got some extra structural information, viz. that the anion is composed of oxygen and hydrogen. The anion OH− is known as hydroxide and thus our compound is named potassium hydroxide.
Likewise, it is known that NH4NO3 dissociates into cations NH4+ and anions NO3−. The NH4+ cation is known as ammonium and the NO3− anion as nitrate so our compound is is named ammonium nitrate.