Given a number in a given base, convert it into another target base.
Input : Number = "123" Source Base = 8 Target Base = 10 Output : 83 3 * 1 + 2 * 8 + 1 * 64 = 83 Input : Number = "110" Source Base = 2 Target Base = 10 Output : 6
Octal to Decimal: 365 Octal to Hex: 16d
Attention reader! Don’t stop learning now. Get hold of all the important Java and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.
- How to calculate log base 2 of an Integer in Java?
- Using the super Keyword to Call a Base Class Constructor in Java
- Widening Primitive Conversion in Java
- Image Processing in Java | Set 3 (Colored image to greyscale image conversion)
- Image Processing in Java | Set 4 (Colored image to Negative image conversion)
- Image Processing in Java | Set 5 (Colored to Red Green Blue Image Conversion)
- Image Processing in Java | Set 6 (Colored image to Sepia image conversion)
- Conversion of Array To ArrayList in Java
- Type conversion in Java with Examples
- Data Conversion Using valueOf() method in Java
- Java Program for Decimal to Binary Conversion
- Conversion of Java Maps to List
- Array to ArrayList Conversion in Java
- ArrayList to Array Conversion in Java : toArray() Methods
- Complement of a number with any base b
- Program to find the last digit of X in base Y
- Program to compute log a to any base b (logb a)
- Case conversion (Lower to Upper and Vice Versa) of a string using BitWise operators in C/C++
- Program for decimal to hexadecimal conversion
- Program for Fahrenheit to Celsius conversion
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.