12. Let $M_{n}=\left\{(\right.$ decimal $) n$-digit pure decimal $0 . \overline{a_{1} a_{2} \cdots a_{n}} \mid \mathrm{a}_{i}$ takes only 0 or $1(i=1,2, \cdots, n-1)$, $\left.a_{n}=1\right\}, T_{n}$ is the number of elements in $M_{n}$, $S_{n}$ is the sum of all elements in $M_{n}$, then $\lim _{n \rightarrow \infty} \frac{S_{n}}{T_{n}}=$ $\qquad$
$$
\frac{1}{18}
$$
12. 【Analysis and Solution】Since the decimals in $M_{n}$ all have $n$ digits after the decimal point, and except for the last digit which must be 1, the other digits each have two choices (0 or 1), we have $T_{n}=2^{n-1}$. In these $2^{n-1}$ numbers, the $n$-th digit after the decimal point is always 1, while the other digits are 0 or 1, each appearing half the time. Therefore,
$$
\begin{array}{l}
S_{n}=\frac{1}{2} \cdot 2^{n-1}\left(\frac{1}{10}+\frac{1}{10^{2}}+\cdots+\frac{1}{10^{n-1}}\right)+2^{n-1} \cdot \frac{1}{10^{n}} \\
=2^{n-2} \cdot \frac{\frac{1}{10}\left(1-\frac{1}{10^{n-1}}\right)}{1-\frac{1}{10}}+2^{n-1} \cdot \frac{1}{10^{n}} \\
=2^{n-2} \cdot \frac{1}{9}\left(1-\frac{1}{10^{n-1}}\right)+2^{n-1} \cdot \frac{1}{10^{n}} \\
\text { Hence } \lim \frac{S_{n}}{T_{n}}=\lim _{n \rightarrow \infty}\left[\frac{1}{18}\left(1-\frac{1}{10^{n-1}}\right)+\frac{1}{10^{n}}\right]=\frac{1}{18} .
\end{array}
$$