Find $2^{3^{100}}$ (mod 5) and its last digit The question is to find $2^{3^{100}} \pmod 5$ and its last digit.
I think we have to find $2 \pmod 5$ and $3^{100}\pmod 5$ separately, right?
$$2 = 2 \pmod 5$$
$$3^4 = 1 \pmod 5$$
$$3^{100} = 1 \pmod 5$$
$$2^{3^{100}} = 2^1 = 2 \pmod 5$$
Is this solution correct? And to find the last digit do we just solve modulo $10$?

Hint for the first question:
By Little Fermat, $\;2^4\equiv 1\mod 5$, hence $\;2^n\equiv 2^{n\bmod 4}\mod 5$. Also $3^2\equiv 1\mod 4$.
Second question:
Use the Chinese Remainder theorem: $\;\mathbf Z/10\mathbf Z\simeq \mathbf Z/2\mathbf Z\times\mathbf Z/5\mathbf Z$.
