"~" in C++ is bitwise operation NOT. Thebitwise NOT, or complement, is an unary operation that performs logical 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;
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment