Apr-15-2019, 11:48 PM
I am trying to read bit by bit from a 128 bit binary number and want to use it.
I was trying my logic on 8 bit number but not getting the bits in order
I was trying my logic on 8 bit number but not getting the bits in order
def get_bit(value,n): return ((value >> n & 1)) for i in range (8): if (get_bit (10100010,i)): print"TRUE" else: print "FALSE"Output:
1 0 1 0 1 0 1 0 0