B
Balban
Hi,
I use a signed integer as some primary id. I want to associate a
second id with this - If the primary id is 32 bits, I could use one
byte of it to encode a secondary id.
E.g. If you think it was unsigned:
0x00FF FFFF -> This could be the primary id mask
0xFF00 0000 -> Could be the secondary id mask
I could easily encode the secondary id by bitwise shifting/anding/
orring.
If the number is signed, is there any elegant way I could achieve the
same thing?
Thanks,
Bahdir
I use a signed integer as some primary id. I want to associate a
second id with this - If the primary id is 32 bits, I could use one
byte of it to encode a secondary id.
E.g. If you think it was unsigned:
0x00FF FFFF -> This could be the primary id mask
0xFF00 0000 -> Could be the secondary id mask
I could easily encode the secondary id by bitwise shifting/anding/
orring.
If the number is signed, is there any elegant way I could achieve the
same thing?
Thanks,
Bahdir