BitMaskClear

Performs a bitwise mask clear operation.

Method Signature

BitMaskClear(number=[integer], start=[integer], length=[integer])

Arguments

Argument
Type
Required
Description
Default

number

integer

true

32-bit signed integer on which the mask clear operation is performed.

start

integer

true

Start bit for the clear mask (Integer in the range 0-31, inclusive).

length

integer

true

Length of bits in the clear mask (Integer in the range 0-31, inclusive).

Examples

Bitwise Mask Clear

Uses the bitMaskClear function to clear (setting to 0) each of the corresponding bits

Run Example

bitMaskClear( 3, 0, 1 );

Result: 2

Using non zero start parameter

Run Example

bitMaskClear( 3, 1, 1 );

Result: 1

Using non zero mask start and length parameters

Run Example

bitMaskClear( 10, 1, 2 );

Result: 8

Additional Examples

Run Example

writeOutput( bitMaskClear( 255, 5, 5 ) );
writeOutput( "<br>" );
writeOutput( bitMaskClear( 255, 0, 4 ) );

Last updated

Was this helpful?