E
ex laguna
How do I find the lowest bit position of a mask using only macros?
I want to do everything in compile time. That mean, there cannot be
control statements such as if, while, for, etc. in the macro.
Note that the macro takes only one (1) argument, the mask.
Examples:
// Mask Lowest bit position
0111 0000 4
0001 0000 4
0001 1000 3
0011 1111 0
Thanks.
I want to do everything in compile time. That mean, there cannot be
control statements such as if, while, for, etc. in the macro.
Note that the macro takes only one (1) argument, the mask.
Examples:
// Mask Lowest bit position
0111 0000 4
0001 0000 4
0001 1000 3
0011 1111 0
Thanks.