How are chemical formulas of binary ionic compounds generally written?

How are chemical formulas of binary ionic compounds generally written?