What is the most efficient way to compare a flag (0x00010001) bitwise with an integer and see if both the bit in integer is set ?
In other words what is the most efficient way to perform following ?
bit = (number & 0x001 ) & (number 0x 0x00010000 )
I’d go with
which will be true if and only if both bits in
numberare set.