Python - bit manipulation and decoding signed value in 2's complement

Status
You're currently viewing only bames53's posts. Click here to go back to viewing the entire thread.
Not open for further replies.
I'd expect that all you have to do is read the bytes into your 32-bit int, account for endianness, and the sign bit will be exactly where it ought to be.

The way you're describing this is a bit odd because bit order and byte order aren't related, so it doesn't make much sense to talk about 'the 64th bit' when you have a stream of bytes. It's probably better to talk (and think) in terms of significance instead.
 
Status
You're currently viewing only bames53's posts. Click here to go back to viewing the entire thread.
Not open for further replies.