# Convert BigInteger into another radix number : BigInteger « Data Type « Java

Home
Java
 1 2D Graphics GUI 2 3D 3 Advanced Graphics 4 Ant 5 Apache Common 6 Chart 7 Class 8 Collections Data Structure 9 Data Type 10 Database SQL JDBC 11 Design Pattern 12 Development Class 13 EJB3 14 Email 15 Event 16 File Input Output 17 Game 18 Generics 19 GWT 20 Hibernate 21 I18N 22 J2EE 23 J2ME 24 JDK 6 25 JNDI LDAP 26 JPA 27 JSP 28 JSTL 29 Language Basics 30 Network Protocol 31 PDF RTF 32 Reflection 33 Regular Expressions 34 Scripting 35 Security 36 Servlets 37 Spring 38 Swing Components 39 Swing JFC 40 SWT JFace Eclipse 41 Threads 42 Tiny Application 43 Velocity 44 Web Services SOA 45 XML
 Java » Data Type » BigInteger Screenshots
Convert BigInteger into another radix number
 ```      import java.math.BigInteger; public class Main {   public static void main(String[] args) {     BigInteger number = new BigInteger("2008");     System.out.println("Number      = " + number);     System.out.println("Binary      = " + number.toString(2));     System.out.println("Octal       = " + number.toString(8));     System.out.println("Hexadecimal = " + number.toString(16));     number = new BigInteger("FF", 16);     System.out.println("Number      = " + number);     System.out.println("Number      = " + number.toString(16));   } }                 ```
Related examples in the same category
 1 BigInteger.isProbablePrime 2 Compute the Palindrome of a number by adding the number composed of 3 Operating with Big Integer Values 4 Create BigInteger via string 5 Create BigInteger via long type variable 6 Multiply one BigInteger to another BigInteger 7 Subtract one BigInteger from another BigInteger 8 Divide one BigInteger from another BigInteger 9 Negate a BigInteger 10 Calculate the power on a BigInteger 11 Create BigInteger from byte array 12 Performing Bitwise Operations with BigInteger 13 Get the value of a bit 14 Set a bit for BigInteger 15 Clear a bit in a BigInteger 16 Flip a bit in a BigInteger 17 Shift the bits in a BigInteger 18 Shift right in a BigInteger 19 xor a BigInteger 20 and operation on BigInteger 21 not operation for BigInteger 22 or operation for BigInteger 23 antNot operation on BigInteger 24 Retrieve the current bits in a byte array in twos-complement form. 25 Parsing and Formatting a Big Integer into Binary 26 Parsing and Formatting a Big Integer into octal 27 Parsing and Formatting a Big Integer into decimal 28 Parse and format to hexadecimal 29 Parse and format to arbitrary radix <= Character.MAX_RADIX 30 Create a BigInteger using the byte array 31 Parsing and Formatting a Byte Array into Binary 32 Parsing and Formatting a Byte Array into Octal 33 Parsing and Formatting a Byte Array into decimal 34 Parsing and Formatting a Byte Array into Hexadecimal 35 Parse binary string 36 Get byte array from BigInteger 37 Parse octal string to create BigInteger 38 Parse decimal string to create BigInteger 39 Parse hexadecimal string to create BigInteger 40 Do math operation for BigInteger 41 Operate with big integer values in code 42 Demonstration of high-precision integer arithmetic with the BigInteger class 43 This program uses big numbers to compute the odds of winning the grand prize in a lottery. 44 BigInteger bitwise Gcd 45 BigInteger lowest numBits 46 BigInteger highest numBits 47 Is one BigInteger Divisible by another BigInteger 48 Is a BigInteger Even