if your working with bitmasks..use shifting operations..
val=1 shl n
n=0, val=1 shl 0 =1
n=1, val=1 shl 1 =2
n=2, val=1 shl 2 =4
....
....
using power operations to determine bitmasks seems a little
pointless..this is what you are trying to do right?
anyway - perhaps the above logic will help..
val=1 shl n
n=0, val=1 shl 0 =1
n=1, val=1 shl 1 =2
n=2, val=1 shl 2 =4
....
....
using power operations to determine bitmasks seems a little
pointless..this is what you are trying to do right?
anyway - perhaps the above logic will help..