What are the bitwise operations of Python integer types
This article mainly talks about "what are the bitwise operations of Python integer types". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "what are the bitwise operations of Python integer types"?
The code experiment shows:
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32Type "help", "copyright" "credits" or "license ()" for more information. > > 1 | 23 > > 0b0011 | 0b101011 > > 0b00113 > 0b101010 > > 0b101111 > # XOR > > 0b0011 ^ 0b10109 > 0b10019 > # bitwise and Operation > 0b0011&0b10102 > > 0b00102 > # move left > > 45 > > 45 > > 21111 > 48 > > 48 > > 36 > # bit-by-bit inversion > ~ 0b1100-13 > > ~ 0b0011-4 > > ~ 1-2 > > ~-10 > ~ 15-16 > ~ 1514 > ~ 1615 > > 0b110012 > 0xFF = 27 > > 0xFF255 > 65535 & 0xFF255 > > 65536 & > 0xFF0 > so far I believe that everyone on the "Python integer type of bitwise operations have a deeper understanding, might as well to the actual operation of it!" Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!