Posts

Showing posts from March 22, 2019

How to strip off left side of binary number in Python?

Image
0 I got this binary number 101111111111000 I need to strip off the 8 most significant bits and have 11111000 at the end. I tried to make 101111111111000 << 8 , but this results in 10111111111100000000000 , it hasn't the same effect as >> which strips the lower bits. So how can this be done? The final result MUST BE binary type. python binary share | improve this question asked Nov 25 '18 at 22:35 Rodrigo Formighieri Rodrigo Formighieri 110 9