private int binaryToDecimal(String binaryNumber){
        int len = binaryNumber.length(),sum =0,c=0;
        int e = 0;
        int multiplier = 0;
        for(int start=0; start<binaryNumber.length(); start++)
        {
            len--;
            e= (int) Math.pow(2,len);
            if(binaryNumber.charAt(start) == '0'){
                multiplier = 0;
            }
            else{
                multiplier = 1;
            }
            c = multiplier * e;
            sum=sum+c;
        }
        return sum;
    }