bitwise or (either bit= ) bitwise and (both bits= ) in the first expressiona binary (in base is shifted left two slots to create binary ( the last two operations perform binary or to combine bits ( and binary and to select common bits ( & such bitmasking operations allow us to encode and extract multiple flags and other values within single integer this is one area where the binary and hexadecimal number support in python as of and become especially useful--they allow us to code and inspect numbers by bitstringsx < bin( < ' bin( ' bin( ' binary literals shift left binary digits string bitwise oreither bitwise andboth this is also true for values that begin life as hex literalsor undergo base conversionsx xff hex literals bin( ' bitwise xoreither but not both bin( ' int(' ' digits=>numberstring to int per base hex( number=>digitshex digit string ' also in this departmentpython and introduced new integer bit_length methodwhich allows you to query the number of bits required to represent number' value in binary you can often achieve the same effect by subtracting from the length of the bin string using the len built-in function we met in (to account for the leading " ")though it may be less efficientx bin( ) bit_length()len(bin( ) (' ' bin( )( bit_length()len(bin( ) (' ' numeric types