in reply to Re^4: [NOT] How would you decode this?
in thread [NOT] How would you decode this?

Ah right, I was thinking about the cutoff point being at 2^24 and that is a power of two. Really self-evident ;-)) Doh

Replies are listed 'Best First'.
Re^6: [NOT] How would you decode this?
by LanX (Saint) on Dec 28, 2010 at 22:24 UTC
    Since at the end you have to use an AND anyway to cut off the 2 flag-bits you could use a negative offset of 8 bits and mask 10 bits of a 2**5=32 bit vec without loss of speed!

    Flags 01234567|FF|ddddddddddddddddddddd 32 bit Vector -8 bits | | 22 bits Data 00000000|00|111111111111111111111 Mask

    Cheers Rolf