Wednesday, June 23, 2010

C bitwise operator

~x + 1 = -x;
e.g. ~(-1) +1 = -(-1); that is ~(-1) = 0;
e.g. ~27 +1 = -27; that is ~27 = -28;

No comments:

Post a Comment