Javascript solution
```\n/*\n * @param {number} N\n * @return {number}\n /\nvar bitwiseComplement = function(N) {\n    return ((1 << (N.toString(2).length)) - 1) ^ N;\n};
```\n/**\n * @param {number} N\n * @return {number}\n */\nvar bitwiseComplement = function(N) {\n    return ((1 << (N.toString(2).length)) - 1) ^ N;\n};
['JavaScript']