Hi, Edouard wrote: > #define IS_SET_FLAG(a, flag) \ > (!!((a)&(flag))) > It 'returns': > - 1 for (a & flag) != 0 > - 0 for (a & flag) == 0 Since we know that's a one-bit flag, we can also do (a & flag) >> (log2(flag)) where log2(flag) is the bit position Of course that stops making any difference at this level :) Radek