Want to extract bits from a binary or integer value.
From one end i am sending hex
value of 01 00 00
in a byte array.After receiving in other end, converting into integer then try to get range of bits from that. hex(100000) = 65536
. Now i want range of bits from this value.
input_2 = 65536
result= bin(input_2)
The problem here is , its 3 byte(24bits) data so it should able give 19-24 bits value.
0001 0000 0000 0000 0000 0000
so i want bit range from 19-24. How can i do?