Bit NOT
ActionStep Reference » Programming » Number Operation » Logic » Bit NOT
The ActionStep Bit NOT inverts the bits of a number and stores the number in Result of the result list. The following number types are allowed: Signed and Unsigned.
- Open the Programming node in the Workspace Explorer.
- Open the Number Operation node.
- In the Logic node, select the Bit NOT ActionStep.
Parameters:
The ActionStep has the following input parameters:
NAME |
DESCRIPTION
|
---|---|
Number Type
|
Specifies the data type to be used for a number.
Allowed Context Scopes [Fixed, Local, Global] Allowed Values [Signed Number, Unsigned Number] |
Pattern 1
|
The number to be inverted.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Results:
The ActionStep returns the following results:
NAME
|
DESCRIPTION
|
---|---|
Result |
Contains the inverted value of a number.
Allowed Context Scopes [Fixed, Local, Global] Allowed Number System [Binary, Decimal, Hexadecimal] |
The number type set in the ActionStep Bit NOT determines the data type of its Result even if the variables and/or parameters that were set for pattern 1 are of different data types. |
Remarks:
The Bit NOT ActionStep will display the inverse value of a bit. The ActionStep returns the following results:
BIT IN PATTERN 1
|
BIT IN RESULT |
---|---|
0 | 1 |
1 | 0 |
The Bit NOT ActionStep inverts a signed binary number that is represented by the two's complement. |
Example 1 (Changing the bit value of a variable):
This example inverts the bit value for the local Crypt Value variable with an Unsigned Number data type. The result is then output via Write Text.