Chemical formula of a heteroatomic molecule is determined on the basis of the valency of combining elements.
The chemical formula of a heteroatomic molecule (compound) is determined by valency of combining elements. The combining power (or capacity) of an element is known as its valency.
Example:- Chemical formula of hydrogen chloride is HCl. It is formed by the combination of hydrogen (H) and chlorine (Cl) atoms with valency of hydrogen equal to 1 and that of chlorine also equal to 1.