Just wondering 

 

I have a 32 bit hex number as following -  0xa7f6d92a82c8d8f2

 

How do I acccertain the 29th bit 

 

Functions bin and bits all return an ascii string 

 

 

bin(0xa7f1d92a82c8d8fe)

"1010011111110001110110010010101010000010110010001101100011111110"

 

what is the most efficient way of finding a bit of a hex value 

 

bin(0xa7f1d92a82c8d8fe)[29] and then convert this string to a bool?

 

Interested to see the alternatives


cheers

M

 

 

Reply via email to