import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
String a = "10";
String b = "11";
int a0 = Integer.parseInt(a, 2);
int b1 = Integer.parseInt(b, 2);
int product = a0 * b1;
Integer.toString(product);
int result = Integer.parseInt(product);
System.out.print(result);
}
}
I've tried all the methods I've seen in stackoverflow and none of them work in my case. I can convert the binary to base10, but can't convert it back.