how to calculate no of 0 bits in java code example Example: bit counting countBits = (n) => n.toString(2).split("0").join("").length;