  For the purpose of elucidating the gas sensing mechanism of SnO$_2$ for NO
and NO$_2$ gases, we calculate the phase diagram of SnO$_2$(110) surface in
contact with an O$_2$ and NO gas environment by means of {\it ab initio}
thermodynamic method. Firstly we build a range of surface slab models of oxygen
pre-adsorbed SnO$_2$(110) surfaces using (1$\times$1) and (2$\times$1) surface
unit cells and calculate their Gibbs free energies considering only oxygen
chemical potential. The fully reduced surface containing the bridging and
in-plane oxygen vacancies in the oxygen-poor condition, while the fully
oxidized surface containing the bridging oxygen and oxygen dimer in the
oxygen-rich condition, and the stoichiometric surface in between, were proved
to be most stable. Using the selected plausible NO-adsorbed surfaces, we then
determine the surface phase diagram of SnO$_2$(110) surfaces in
($\Delta\mu_\text{O}$, $\Delta\mu_\text{NO}$) space. In the NO-rich condition,
the most stable surfaces were those formed by NO adsorption on the most stable
surfaces in contact with only oxygen gas. Through the analysis of electronic
charge transferring and density of states during NO$_x$ adsorption on the
surface, we provide a meaningful understanding about the gas sensing mechanism.
