representing binary numbers in array of count of 1 and 0 code example Example: bit counting countBits = (n) => n.toString(2).split("0").join("").length;