Not having a bitwise compliment operator is inconvenient but the code below seems to work ok although not necessarily better than what you already have but maybe conceptually clearer? Start with $xFF mask (11111111) or larger if you need more bits, then use XOR to clear the desired bit before ANDing with val to clear desired bit in variable. Didn't test for speed though.
@init
val=$xF0;
n=7; // MSB
val&=$xFF~(1<<n);
|