Python Forum
NOT bit-wise operation question
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NOT bit-wise operation question
#3
(Jan-27-2020, 07:58 AM)stranac Wrote: This has a pretty good explanation: https://wiki.python.org/moin/BitwiseOperators

Thank you Smile

Apparently, a NOT gives -x-1
and in this case, it would be ~x = -100 - 1
~x = - 101 which equals to -5 decimal


Cheers
Reply


Messages In This Thread
NOT bit-wise operation question - by ajayachander - Jan-27-2020, 07:14 AM
RE: NOT bit-wise operation question - by stranac - Jan-27-2020, 07:58 AM
RE: NOT bit-wise operation question - by ajayachander - Jan-27-2020, 08:03 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Beginner's String Operation question docboy 6 3,551 Sep-30-2018, 05:49 PM
Last Post: j.crater

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020