I converted a String to BigInteger as follows:
String
BigInteger
Scanner sc=new Scanner(System.in); System.out.println(\"enter the message\"); String
String input = "0101"; BigInteger x = new BigInteger ( input , 2 ); String output = x.toString(2);