Number of different natural numbers which are smaller than two hundred million and using only the digits $1$ or $2$ is Number of different natural numbers which are smaller than two hundred million and using only the digits $1$ or $2$ is:

These numbers will be either 1 digit,2 digits,.......9 digits.Number of such $9$ digits numbers are  $2^8$,number of such $8$ digits numbers are $2^8$ and so on.So the total numbers are $2^8+2^8+2^7+2^6+.........+2^2+2^1$.
But the answer is $3\times 2^8-2$

The number of different natural numbers which are smaller than $200,000,000$ and use only the digits $1$ or $2$ is 
$$2^8 + 2^8 + 2^7 + 2^6 + 2^5 + 2^4 + 2^3 + 2^2 + 2^1$$
as you stated.  However,
\begin{align*}
2^8 + 2^8 + 2^7 + 2^6 + 2^5 + 2^4 + 2^3 + 2^2 + 2^1 & = 2^8 + \sum_{k = 1}^{8} 2^k\\
& = 2^8 + 2\sum_{k = 1}^{8} 2^{k - 1}\\
& = 2^8 + 2 \cdot \frac{1 - 2^8}{1 - 2}\\
& = 2^8 + 2(2^8 - 1)\\
& = 3 \cdot 2^8 - 2
\end{align*}
where we have used the geometric series formula 
$$\sum_{k = 1}^{n} r^{k - 1} = \frac{1 - r^n}{1 - r}$$
