static void Bin2Dec(){
        System.out.println();
        System.out.print("Please enter a binary number containing only 0s and 1s: ");
        String binary = s.nextLine();
        
        for(int i = 0; i < binary.length(); i++){
            if(binary.charAt(i) != '0' && binary.charAt(i) != '1'){
                System.out.println("That is not a valid binary number.");
                return;
            }
        }
        
        double decimal = 0;
        
        for(int i = 0; i < binary.length(); i++){
            decimal = decimal + (Character.getNumericValue(binary.charAt(i)) * Math.pow(2.0, binary.length() - (i+1)));
        }
        
        System.out.println("The decimal of binary " + binary + " is " + decimal);
    }