Hi,
Is there a way to extract the k most significant bits of a 64-bit integer,
i.e. if k = 3, and the integer is 1011100...001 in binary, then I get the
first 3 bits 101 and read that as 5? I thought of using the right-shift
bitwise operator >>, but that works only for 8-bit integers, right?

Thank you.

Regards,
Rayne


Reply via email to