Answer to Question #27865 in C++ for asha
negation on each bit, forming the ones' complement of the given binary value.
Bits that are
0 become 1, and those that are 1 become 0. The bitwisecomplement is equal to the two's complement of the value minus one. If two's
complement arithmetic is used, then ~x = - x - 1.
In your case
a = a - ~b - 1 = a - (-b + 1) - 1 = a + b;
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!