Python Find Bit Length In Networking