Performs a bitwise mask set operation.
bitMaskSet(number, mask, start, length)
returns numeric
Name | Type | Required | Default | Description |
---|---|---|---|---|
number | numeric | Yes | Integer | |
mask | numeric | Yes | Integer mask | |
start | numeric | Yes | Start bit for the set mask (Integer in the range 0-31, inclusive) | |
length | numeric | Yes | Length of bits in the set mask (Integer in the range 0-31, inclusive) |
Performs masking operation on each of the corresponding bits
bitMaskSet(6, 1, 0, 1)
Bit shift the mask 2 places
bitMaskSet(10, 1, 2, 1)
bitMaskSet(10, 2, 1, 2)