Given a number $n$ in decimal representation, how do we get the $i$'th digit from the right in the equivalent representation in another base $b$? Let's say we have a number $n$, how do we know the $i$'th digit from the right in the equivalent representation in another base $b$?
For example, if $n = 12_{10}$, and we want to check what the second $(i = 2)$ bit is in the equivalent representation of $12$ in base $3$ (which would be $110_3$), then the answer is $1$.
Edit: I found a formula on stack overflow, which is $$\Bigl \lfloor \frac{n}{b^{i}} \Bigr \rfloor \bmod b$$
How did we get this formula?
 A: A number $n$ in base $b$, where the digits are $d_j$ for the term with $b^j$, is equivalent to
$$n = \sum_{j=0}^{k}d_j b^{j} \tag{1}\label{eq1A}$$
for some non-negative integer $k$. Since you have $0 \le d_j \le b - 1$, this means for all $i$ that the sum of all terms less than $i$ is less than $b^i$ (this is what allows the digits to be unique). Thus, when you divide $n$ by $b_i$, those terms then sum to a value less than $1$. As such, when you take the floor function of it, this fractional part will be removed, so you are left with just the integer part comprised of the higher order terms, but with each of their powers of $b$ reduced by $i$. In particular, you have
$$\frac{n}{b^i} = \sum_{j=i}^{k}d_j b^{j-i} + \frac{\sum_{j=0}^{i-1}d_jb^{j}}{b^{i}} \tag{2}\label{eq2A}$$
with $\frac{\sum_{j=0}^{i-1}d_jb^{j}}{b^{i}} \lt 1$, leading to
$$\left\lfloor \frac{n}{b^i} \right\rfloor = \sum_{j=i}^{k}d_j b^{j-i} \tag{3}\label{eq3A}$$
When you take the result modulo $b$, all of the terms except the lowest one have at least one factor of $b$, so they are each congruent to $0$, resulting in the just the lowest order term, i.e., $d_i$, remaining, giving
$$\left\lfloor \frac{n}{b^i} \right\rfloor \bmod b = d_i \tag{4}\label{eq4A}$$
A: There are general algorithms, but for small numbers you can also just 'go to work' on this, looking at it as an 'algebraic puzzle'.
For your example, $12$ to $\text{base-three}$ representation,
$\text{base-three}$ symbols
$\quad D_\text{three} = \{0,1,2\} \text{ and } \beta \text{ is the next integer after } 2 \quad \text{(using the symbol } 3 \text{ is not a good idea here)}$
So, the symbol $2$ means the same thing in both systems and
$\quad 12_{10} = (2 + 2 + 2 + 2 + 2 + 2)_{\beta}$
and since  $(2 + 2)_{\beta} = 11_{\beta}$,
$\quad 12_{10} = (11 + 11 + 11)_{\beta} = (22 + 11)_{\beta}$
and since  $(20 + 10)_{\beta} = 100_{\beta}$,
$\quad 12_{10} = (20 + 2 + 10 + 1)_{3} = (100 + 2 + 1)_{\beta}$
and since $(2+1)_{\beta} = 10_\beta$ we get the answer,
$\quad 12_{10} = (100 + 10)_{3}  = 110_{3}$
