def get_bit(value, bit):
return <NUM_LIT:0> if value & <NUM_LIT:2> ** bit == <NUM_LIT:0> else <NUM_LIT:1><EOL>
return 1 or 0 from the bit at the given offset >bit<, e.g.:

>>> get_bit(0x01, bit=0) # 00000001
1
>>> get_bit(0xfd, bit=1) # 11111101
0
>>> get_bit(int('10000000', 2), bit=7)
1
>>> get_bit(int('01111111', 2), bit=7)
0
>>> get_bit(int('1111000011110000', 2), bit=11)
0
>>> get_bit(int('1111000011110000', 2), bit=12)
1