Java tutorial
import java.math.BigInteger; public class Main { public static void main(String[] argv) throws Exception { BigInteger bi = new BigInteger("1023"); // Parse and format to binary bi = new BigInteger("1111111111", 2); String s = bi.toString(2); System.out.println(s); bi = new BigInteger("1000", 8); System.out.println(s = bi.toString(8)); bi = new BigInteger("1023"); s = bi.toString(); System.out.println(s); bi = new BigInteger("3ff", 16); s = bi.toString(16); System.out.println(s); } }