-
Notifications
You must be signed in to change notification settings - Fork 2
Apply bitmask
This transform takes an incoming value and applies a flag based on the specified operator.
Parameter name | Description |
---|---|
Value to apply to bitmask | The flag value to apply to the incoming value |
Bitmask operator | The bitwise operation to perform on the value |
The transform accepts a single integer value as an input.
The transform accepts multiple input values, and processes each of them individually
The transform returns an integer for each input value
The and operator is used to check for the existence of a flag value. If the flag is set, then the flag value is returned. If the flag is not set, zero is returned.
Incoming value | Value to apply | Outbound value |
---|---|---|
512 | 2 | 0 |
514 | 2 | 2 |
The or operator is used to turn on a flag. If the flag is already turned on, the operator has no effect.
Incoming value | Value to apply | Outbound value |
---|---|---|
512 | 2 | 514 |
514 | 2 | 514 |
The xor operator is used to toggle a flag. If the flag is on, the xor operation will turn it off. If it is off, the operation will turn it on
Incoming value | Value to apply | Outbound value |
---|---|---|
512 | 2 | 514 |
514 | 2 | 512 |
The nand operator is used to turn off a flag value. If the flag is already off, the operator has no effect.
Incoming value | Value to apply | Outbound value |
---|---|---|
512 | 2 | 512 |
514 | 2 | 512 |