Java - Number of 1s = 0s in bit string : Interested in using bitwise operators to count number of 1s = 0s in a bit string.  If 1s=0s then output.  Any ideas on using Java to accomplish this.  Thank you.

    `public void function(int binaryNumber) {
     BigInteger val = new BigInteger(String.valueOf(binaryNumber));
    val = val.abs();
    int count = val.bitCount();
    String binaryString = val.toString(2);

    System.out.println("count = " + count);
    System.out.println("bin = " + binaryString);
    }`