1

Why compiler does 2's complement in the bitwise NOT operation?

example : ~5 = -6

~5 = 1010 which is actually 10 in decimal

but compiler takes 2's complement of 1010 which will be -6.

JaMiT
  • 14,422
  • 4
  • 15
  • 31

0 Answers0