#Hi, I need someone to explain me that why the output of the below given code snippet comes -11 .
8 messages · Page 1 of 1 (latest)
thats BITWISE NOT operator, it not really giving 11 (eleven) but 1-1 (one-one)
I don't think so
If you inverse the bits of the number 10, you get 11110101 which is equal to -11
its a real thing, Bitwise not is invert of bits NOT value
decimal 10 is 1010 in binary, and invert of 1010 is 0101,
0101 is equal to -11 in 2s compliment
yes, i used 4bit seperation