The sum of a number and it's complement is all 111's.
\'\'\'\nclass Solution {\npublic:\n    int bitwiseComplement(int N)\n    {\n        if(N==0)return 1; \n        int sum = (int)pow(2,1+(int)log2(N))-1;\n       
\'\'\'\nclass Solution {\npublic:\n    int bitwiseComplement(int N)\n    {\n        if(N==0)return 1; \n        int sum = (int)pow(2,1+(int)log2(N))-1;\n        return sum-N;\n    }\n};
['Math', 'C', 'C++']