private static int toNumFromString(String binary){
		int sum = 0;
		char[] all = binary.toCharArray();
		
		for(int i = 0; i < all.length; i++){
			if(all[i] == '1'){
				sum += binary(all.length - 1 - i);
			}
		}
		
		return sum;
	}