Quantcast
Channel: CSharp Forum Latest Questions
Viewing all articles
Browse latest Browse all 32127

Extracting N-bit signed integer from a byte array

$
0
0

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 32127

Trending Articles