bitMaskClear

Performs a bitwise mask clear operation.

bitMaskClear(number, start, length) → returns numeric

bitMaskClear Argument Reference

number numeric
Required

Integer

start numeric
Required

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

length numeric
Required

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

Examples sample code invoking the bitMaskClear function

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

bitMaskClear(3, 0, 1)

Expected Result: 2

bitMaskClear(3, 1, 1)

Expected Result: 1

bitMaskClear(10, 1, 2)

Expected Result: 8


Fork me on GitHub