public static int GetOnCount(int value, int length){
        String binary = DecimalToBinary(value, length);
        char[] binaryChar = binary.toCharArray();
        int count = 0;
       for(int i = 0; i < binary.length(); i++){
        	if(binaryChar[i] == '1'){
        		//return count;
        	//}
        	count++;
        }
       }
       return count;
    }