To find the last digit i.e the unit digit you need to be aware of the cyclicity of the numbers and their powers
We can see that unit's digit of 21,25,29 is 2 and so on. Therefore, after every four powers of 2, the units digit of the number starts repeating.Thus we can say that cyclicity of unit's digit of higher powers of 2 is 4.
Similarily unit digit of power of 4 starts reeating after 2, thus its cyclicity is 2.
Unit digit follows a periodic pattern that is after a particular period it repeats in a cyclic form, this is called cyclicity.
Unit digits of numbers ending with 0,1,5,6 is always the same irrespective of their powers raised on them.
Unit digit of numbers ending with 4,9 follows the pattern with cyclicity of 2
Unit digit of numbers ending with 2,3,7,8 follows the pattern with cyclicity of 4
In order to find the last digit of any number xyzabc whose who's last digit 'z' has the cyclicity of 4, then to find the last digit write the number as z4k + m where 4k+m = abc, and m is smaller than equal to z and not 0.
In order to find the last digit of any number xyzabc whose who's last digit 'z' has the cyclicity of 2, then to find the last digit write the number as z2k + m where 2k+m = abc, and m is smaller than or equal to z ans is not equal to 0.