BITRESET function
Syntax
BITRESET (expression, bit#)
Description
Use the BITRESET function to reset to 0 the bit number of the integer specified by expression. Bits are counted from right to left. The number of the rightmost bit is 0. If the bit is 0, it is left unchanged.
If expression evaluates to the null value, null is returned. If bit# evaluates to the null value, the BITRESET function fails and the program terminates with a run-time error message.
Values that are not integers are truncated before the operation is performed.
Example
PRINT BITRESET(29,0),BITRESET(29,3)
* The binary value of 29 = 11101
* The binary value of 28 = 11100
* The binary value of 21 = 10101
PRINT BITRESET(2,1),BITRESET(2,0)
* The binary value of 2 = 10
* The binary value of 0 = 0
This is the program output:
28 21
0 2