repeated long division. take the number, divide by the base giving you a whole-part and remainder
the remainder is the next "digit" starting on the right
repeat dividing the whole part by the base till all you have are remainders
eg: 5(decimal) in base 2
5/2 = 2 remainder 1 -- right most digit is 1
2/2 = 1 remainder 0 -- next digit left is 0
1/2 = 0 remainder 1 -- next digit left is 1 Answer: 5 decimal = 101 binary
eg2: 45(decimal) in base 16
45/16 = 2 remainder 13 -- 10=A, 11=B, 12=C, 13=D -- right most digit is "D"
2/16 = 0 remainder 2 -- next digit left is 2 Answer: 2D
same idea/method works for any base in the world... base 8, base 5, base 40, whatever....
========
converting to decimal from base <whatever>
right most digit + (base X 2nd-digit-from-the-right) + (base X base X 3rd) + (base X base X base X 4th) +.... etc.
eg: 101 binary = 1 + (2 X 0) + (2 X 2 X 1) == 5
2D hex = 13 + (16 X 2) = 45
tuh-duh! you can now convert anything