Multiplying numbers with different bases