public static void Main(string[] args)
Console.Write("Enter the first binary number: ");
string binary1 = Console.ReadLine();
Console.Write("Enter the second binary number: ");
string binary2 = Console.ReadLine();
int num1 = Convert.ToInt32(binary1, 2);
int num2 = Convert.ToInt32(binary2, 2);
int result = num1 * num2;
string binaryResult = Convert.ToString(result, 2);
Console.WriteLine("Result in binary: " + binaryResult);
catch(FormatException ex)
Console.WriteLine("Please enter binary number in form of 0 and 1 only. Exception is:"+ex.Message);
catch(ArgumentException ex)
Console.WriteLine("Please enter binary number in form of 0 and 1 only without any sign. Exception is:"+ex.Message);