I'm writing a program that allows conversion between base 10, base 2, and base 8. I decided to make it so that it can from any base to any base by using the method where you divide the number being converted by the base it's being converted to. The problem is that if I have say 15 in base 2 1111 and I'd like to convert it to base 10 so I make java divide 1111 by 1010 it's not going to know that I want base 2 division and it will treat it as standard base 10 division.
Is there a way to do arithmetic in different bases in java?