I have a number:
11100111
I want an operation to change a specific bit of my choice to 0.
So, if I wanted it to be :
10100111
for the 7th bit what operation would I use, for, say:
$x = 6;
$y = "11100111";
It's going to look something like:
$z = $y & $x
But, I know that's wrong. I know I could subtract 2^$x from the value, but that seems inelegant.