Quantcast
Viewing all articles
Browse latest Browse all 32062

Extracting N-bit signed integer from a byte array

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?


Viewing all articles
Browse latest Browse all 32062

Trending Articles