Well, yeah I realized the put bit didn't work to clear a bit...
How bout this:
He doesn't have to understand the bitwise math to use them as black box functions ;)
How bout this:
Function GetBit(value,position) Return (value Shr (position - 1)) And 1 End Function Function SetBit(value, position) Return value Or (1 Shl (position - 1)) End Function Function UnSetBit(value, position) Return value And ~(1 Shl (position - 1)) End Function Function ToggleBit(value,position) Return (1 Shl (position - 1)) Xor value End Function
He doesn't have to understand the bitwise math to use them as black box functions ;)