If I use this: if(value & 4) to check if the bit is set, then how do I check if the bit isn\'t set?
if(value & 4)
I tried with if(!value & 4) or
if(!value & 4)
You could do it many ways, but the easiest (easiest as in requires the least amount of thought) would be just negate the entire expression you already have:
if (!(value & 4))