I have a byte array of variable size (3-5).
I need to extract N-bit signed integer stored as two's complement, having a range of -2^(N-1) + 1 to +2^(N-1) – 1
How can I do that?
I have a byte array of variable size (3-5).
I need to extract N-bit signed integer stored as two's complement, having a range of -2^(N-1) + 1 to +2^(N-1) – 1
How can I do that?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Apr 2, 2013, 10:28 AM
The output which should represent the minimum and maximum values of the 4, 3 and 5 byte numbers is :