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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Apr 2, 2013, 6:28 AM EDT
The output which should represent the minimum and maximum values of the 4, 3 and 5 byte numbers is :