String bin = "101"; int x = Integer.parseInt(bin, 2); // 2진법->10진법 String result = Integer.toBinaryString(x); // 10진법->2진법