Simple Java Sol (XOR)
\npublic class ComplementBase10 {\n\n    public int bitwiseComplement(int N) {\n        // Find number of bits in the given integer\n        int bitCount = (int
```\npublic class ComplementBase10 {\n\n    public int bitwiseComplement(int N) {\n        // Find number of bits in the given integer\n        int bitCount = (int) Math.floor(Math.log(N)/Math.log(2))+1;\n\n        // XOR the given integer with math.pow(2,bitCount-1)\n        return ((1 << bitCount) - 1) ^ N;\n    }\n\n}\n```
[]