This project has moved. For the latest updates, please go here.

Apply bitmask

Summary

This transform takes an incoming value and applies a flag based on the specified operator.

Parameters

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

Input Type

The transform accepts a single integer value as an input.

Multiple input values

The transform accepts multiple input values, and processes each of them individually

Return Type

The transform returns an integer for each input value

Usage

AND operator

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

OR operator

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

XOR operator

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

NAND operator

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

Last edited Feb 21, 2015 at 11:36 PM by ryannewington, version 3