A bit can have two states: 0 and 1, also called "True" and "False". Bit operations are mainly used with conditions, because there you always compare values against each other to decide whether the given condition is fulfilled (0) or not (1). Bits can also be used for logical operations in order to evaluate a result. There, two results are connected and the graph checks if the conjunction of these bits is true or false again. If both bits are 0, for example, then the conjunction is true (0) again. If one bit is 0 and the other one 1 then the result is false (1). For this purpose there are the classic operators like "AND", "OR", and "NOR" implemented as nodes.
Nodes
Name | Description |
---|---|
ArrayBitAllFalse | This node returns true if all the input bits are set to 1. False otherwise. |
ArrayBitAllTrue | This node returns true if all the input bits are set to 0. False otherwise. |
ArrayBitAnyFalse | This node returns true if the input contains at least one bit equal to 0. False otherwise. |
ArrayBitAnyTrue | This node returns true if the input contains at least one bit equal to 1. False otherwise. |
ArrayBitBuildByIndex | Given an array of indices this node returns a mask whereas each index included in the index-array is set to 1. |
ArrayBitConcat | This node concatenates the inputs 'array0' and 'array1' into a single 'out' array. |
ArrayBitConstant | This node returns a constant bit array. |
ArrayBitCountFalse | This node returns the number of bits set to 0 in the input bit array. |
ArrayBitCountTrue | This node returns the number of bits set to 1 in the input bit array. |
ArrayBitFilterByMask | This node returns the elements of the input 'array' at positions specified by the 'mask' parameter. |
ArrayBitFirstFalse | This node returns the position of the first bit set to 0 in the input bit array or -1 if all bits are true. |
ArrayBitFirstTrue | This node returns the position of the first bit set to 1 in the input bit array or -1 if all bits are false. |
ArrayBitInfo | Returns several information about the input bit array. |
ArrayBitInsertElement | This node inserts all elements from the 'element' input into the input 'array' at the position specified by 'position'. If 'position' is equal or lower than 0 then the elements are inserted at the beginning of the array. If 'position' is greater or equal than the inputs 'array' size, elements are appended at the end. |
ArrayBitLastFalse | This node returns the position of the last bit set to 0 in the input bit array or -1 if all bits are true. |
ArrayBitLastTrue | This node returns the position of the last bit set to 1 in the input bit array or -1 if all bits are false. |
ArrayBitMix | This node creates an output array based on the two inputs 'array0' and 'array1' and the input mask. If the mask value equals 0 then the value of 'array0' is used, if the mask value is 1 the value of 'array1' is used. |
ArrayBitRandom | This node returns a random bit array of the size specified by the 'size' input. |
ArrayBitRemoveIndex | This node removes all the input array positions indicated by the 'index' input. |
ArrayBitResize | This node resizes the input 'array'. If the new size is bigger than the original array-size, the last array-value is used to fill up the array. |
ArrayBitReverse | This node reverses the order of the input array. |
ArrayBitSetAll | This node sets all elements of the input 'array' to the given input 'value'. |
ArrayBitSlice | This node returns an array containing the range of the input 'array' from the 'first' position with the given input 'size'.Thus, the output array is a subarray or slice of the input. |
BitAnd | This node returns the AND operation between the input bit arrays. |
BitCopy | This node duplicates the value of 'in' to the output 'copy'. |
BitEqual | This node returns the equivalence ( NOT XOR ) operation between the input bit arrays. |
BitImplication | This node returns the implication (NOT in0 OR in1) operation between the input bit arrays. |
BitNand | This node returns the NAND operation between the input bit arrays. |
BitNegate | This node inverts all the values of the input bit array. |
BitNor | This node returns the NOR (NOT OR) operation between the input bit arrays. |
BitOperation | This node computes a binary operation between the two input arrays. |
BitOr | This node returns the OR operation between the input bit arrays. |
BitXnor | This node returns the XNOR (NOT XOR) operation between the input bit arrays. |
BitXor | This node returns the XOR operation between the input bit arrays. |
GetArrayBitElement | This node returns the elements of the input 'array' at given positions, which are specified by the 'index' parameter. |
GetBitGlobalVariable | This node returns a reference to previously stored variables in global memory (using the SetGlobalVariable-Nodes). |
IntegerBitValue | This node returns the value of the bit at position 'index' of the binary representation of the input 'integer'. |
IntegerSetBitValue | This node returns the input 'integer' value with its bit at position 'bit index' modified according to 'bit value'. |
SetArrayBitElement | This node sets the elements of the input 'array' at given positions, which are specified by the 'index' parameter. The new value is specified by the 'value' input. |
SetBitGlobalVariable | This node allows the user to create a reference or a copy of the input pin in global memory to be used within other RealFlow graph through the GetGlobalVariable nodes. |
ArrayBitAllFalse
This node returns true if all the input bits are set to 1. False otherwise.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in | Bit | through | The in |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
all | Bit | The all | |
through | PassThrough | in | The input 'in' |
ArrayBitAllTrue
This node returns true if all the input bits are set to 0. False otherwise.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in | Bit | through | The in |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
all | Bit | The all | |
through | PassThrough | in | The input 'in' |
ArrayBitAnyFalse
This node returns true if the input contains at least one bit equal to 0. False otherwise.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in | Bit | through | The in |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
any | Bit | The any | |
through | PassThrough | in | The input 'in' |
ArrayBitAnyTrue
This node returns true if the input contains at least one bit equal to 1. False otherwise.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in | Bit | through | The in |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
any | Bit | The any | |
through | PassThrough | in | The input 'in' |
ArrayBitBuildByIndex
Given an array of indices this node returns a mask whereas each index included in the index-array is set to 1.
Example:
index array is [4,3,8,0]
mask is [1, 0, 0, 1, 1, 0, 0, 0, 1 ]
.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
index array | Integer | The index array |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
mask | Bit | The mask |
ArrayBitConcat
This node concatenates the inputs 'array0' and 'array1' into a single 'out' array.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
array0 | Bit | The array0 | |
array1 | Bit | The array1 |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
out array | Bit | The out array |
ArrayBitConstant
This node returns a constant bit array.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
bit | Bit (1) | The bit | |
size | Integer (1) | The size |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
array | Bit | The array |
ArrayBitCountFalse
This node returns the number of bits set to 0 in the input bit array.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in | Bit | through | The in |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
count | Integer | The count | |
through | PassThrough | in | The input 'in' |
ArrayBitCountTrue
This node returns the number of bits set to 1 in the input bit array.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in | Bit | through | The in |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
count | Integer | The count | |
through | PassThrough | in | The input 'in' |
ArrayBitFilterByMask
This node returns the elements of the input 'array' at positions specified by the 'mask' parameter.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
array | Bit | The array | |
mask | Bit | The mask |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
out array | Bit | The out array |
ArrayBitFirstFalse
This node returns the position of the first bit set to 0 in the input bit array or -1 if all bits are true.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in | Bit | through | The in |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
first | Integer | The first | |
through | PassThrough | in | The input 'in' |
ArrayBitFirstTrue
This node returns the position of the first bit set to 1 in the input bit array or -1 if all bits are false.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in | Bit | through | The in |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
first | Integer | The first | |
through | PassThrough | in | The input 'in' |
ArrayBitInfo
Returns several information about the input bit array.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in | Bit | through | The in |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
size | Integer | The size | |
all true | Bit | True if all input bits are True. False otherwise | |
all false | Bit | True if all input bits are False. False otherwise | |
any true | Bit | True if any input bit is True. False otherwise | |
any false | Bit | True if any input bit is False. False otherwise | |
count true | Integer | Number of input bits with True value | |
count false | Integer | Number of input bits with False value | |
first true | Integer | Position of the first input bit set to True | |
first false | Integer | Position of the first input bit set to False | |
last true | Integer | Position of the last input bit set to True | |
last false | Integer | Position of the last input bit set to False | |
negated | Bit | Input array with all the bits inverted | |
through | PassThrough | in | The input 'in' |
ArrayBitInsertElement
This node inserts all elements from the 'element' input into the input 'array' at the position specified by 'position'. If 'position' is equal or lower than 0 then the elements are inserted at the beginning of the array. If 'position' is greater or equal than the inputs 'array' size, elements are appended at the end.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
array | Bit | The array | |
element | Bit | The value to insert | |
index | Integer (1) | The position to insert the input element on |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
out array | Bit | The out array |
ArrayBitLastFalse
This node returns the position of the last bit set to 0 in the input bit array or -1 if all bits are true.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in | Bit | through | The in |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
last | Integer | The last | |
through | PassThrough | in | The input 'in' |
ArrayBitLastTrue
This node returns the position of the last bit set to 1 in the input bit array or -1 if all bits are false.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in | Bit | through | The in |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
last | Integer | The last | |
through | PassThrough | in | The input 'in' |
ArrayBitMix
This node creates an output array based on the two inputs 'array0' and 'array1' and the input mask. If the mask value equals 0 then the value of 'array0' is used, if the mask value is 1 the value of 'array1' is used.
The size of the output is the same as mask's size.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
array0 | Bit | The array0 | |
array1 | Bit | The array1 | |
mask | Bit | The mask |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
out array | Bit | The out array |
ArrayBitRandom
This node returns a random bit array of the size specified by the 'size' input.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
size | Integer (1) | The size | |
seed | Integer (1) | The seed |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
array | Bit | The array |
ArrayBitRemoveIndex
This node removes all the input array positions indicated by the 'index' input. .
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
array | Bit | The array | |
index | Integer | The positions of the input array to remove |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
out array | Bit | The out array |
ArrayBitResize
This node resizes the input 'array'. If the new size is bigger than the original array-size, the last array-value is used to fill up the array.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
array | Bit | The array | |
size | Integer (1) | The size |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
out array | Bit | The out array |
ArrayBitReverse
This node reverses the order of the input array. .
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
array | Bit | The array |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
out array | Bit | The out array |
ArrayBitSetAll
This node sets all elements of the input 'array' to the given input 'value'.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
array | Bit | The array | |
value | Bit (1) | The value |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
out array | Bit | The out array |
ArrayBitSlice
This node returns an array containing the range of the input 'array' from the 'first' position with the given input 'size'.Thus, the output array is a subarray or slice of the input.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
array | Bit | The array | |
first | Integer (1) | The position of the element that will be the first of the output array | |
size | Integer (1) | The total number of elements to copy from the input array. If value is negative, all the elements from 'first' are copied to the output array |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
out array | Bit | The out array |
BitAnd
This node returns the AND operation between the input bit arrays.
The size of the output is the same as of the 'in0' input.
If the 'in1' input is smaller than 'in0' then its last value is reused for the rest of the array operation.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in0 | Bit | The in0 | |
in1 | Bit | The in1 |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
result | Bit | The result |
BitCopy
This node duplicates the value of 'in' to the output 'copy'.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in | Bit | The value to duplicate |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
copy | Bit | A copy of 'in' |
BitEqual
This node returns the equivalence ( NOT XOR ) operation between the input bit arrays.
The size of the output is the same as of the 'in0' input.
If the 'in1' input is smaller than 'in0' then its last value is reused for the rest of the array operation.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in0 | Bit | The in0 | |
in1 | Bit | The in1 |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
result | Bit | The result |
BitImplication
This node returns the implication (NOT in0 OR in1) operation between the input bit arrays.
The size of the output is the same as of the 'in0' input.
If the 'in1' input is smaller than 'in0' then its last value is reused for the rest of the array operation.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in0 | Bit | The in0 | |
in1 | Bit | The in1 |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
result | Bit | The result |
BitNand
This node returns the NAND operation between the input bit arrays.
The size of the output is the same as of the 'in0' input.
If the 'in1' input is smaller than 'in0' then its last value is reused for the rest of the array operation.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in0 | Bit | The in0 | |
in1 | Bit | The in1 |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
result | Bit | The result |
BitNegate
This node inverts all the values of the input bit array.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in | Bit | The in |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
result | Bit | The result |
BitNor
This node returns the NOR (NOT OR) operation between the input bit arrays.
The size of the output is the same as of the 'in0' input.
If the 'in1' input is smaller than 'in0' then its last value is reused for the rest of the array operation.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in0 | Bit | The in0 | |
in1 | Bit | The in1 |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
result | Bit | The result |
BitOperation
This node computes a binary operation between the two input arrays.
The size of the output is the same as of the 'in0' input.
If the 'in1' input is smaller than 'in0' then its last value is reused for the rest of the array operation.
The negate operation is performed only over the 'in0' input.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in0 | Bit | The in0 | |
in1 | Bit | The in1 | |
op | The bit operation |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
result | Bit | The result |
BitOr
This node returns the OR operation between the input bit arrays.
The size of the output is the same as of the 'in0' input.
If the 'in1' input is smaller than 'in0' then its last value is reused for the rest of the array operation.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in0 | Bit | The in0 | |
in1 | Bit | The in1 |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
result | Bit | The result |
BitXnor
This node returns the XNOR (NOT XOR) operation between the input bit arrays.
The size of the output is the same as of the 'in0' input.
If the 'in1' input is smaller than 'in0' then its last value is reused for the rest of the array operation.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in0 | Bit | The in0 | |
in1 | Bit | The in1 |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
result | Bit | The result |
BitXor
This node returns the XOR operation between the input bit arrays.
The size of the output is the same as of the 'in0' input.
If the 'in1' input is smaller than 'in0' then its last value is reused for the rest of the array operation.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
in0 | Bit | The in0 | |
in1 | Bit | The in1 |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
result | Bit | The result |
GetArrayBitElement
This node returns the elements of the input 'array' at given positions, which are specified by the 'index' parameter.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
array | Bit | The array | |
index | Integer | The index |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
out | Bit | The out |
GetBitGlobalVariable
This node returns a reference to previously stored variables in global memory (using the SetGlobalVariable-Nodes).
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
name | String (1) | The name |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
out | Bit | The out |
IntegerBitValue
This node returns the value of the bit at position 'index' of the binary representation of the input 'integer'.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
integer | The integer | ||
bit index | Integer | The position of the bit of the input 'integer' to check |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
bit | Bit | The value of the bit for the 'integer' input |
IntegerSetBitValue
This node returns the input 'integer' value with its bit at position 'bit index' modified according to 'bit value'.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
integer | The integer | ||
bit index | Integer | The position of the bit of the input 'integer' to be modified | |
bit value | Bit | The bit value to set for the 'integer' input |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
result | The input 'integer' with its bit modified |
SetArrayBitElement
This node sets the elements of the input 'array' at given positions, which are specified by the 'index' parameter. The new value is specified by the 'value' input.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
array | Bit | The array | |
index | Integer | The index | |
value | Bit | The value |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
out array | Bit | The out array |
SetBitGlobalVariable
This node allows the user to create a reference or a copy of the input pin in global memory to be used within other RealFlow graph through the GetGlobalVariable nodes.
Inputs
Name | Types | PassThrough | Description |
---|---|---|---|
name | String (1) | The name | |
in | Bit | through | The in |
store copy | Bit (1) | The store copy |
Outputs
Name | Types | PassThrough | Description |
---|---|---|---|
through | PassThrough | in | The value connected to the input |
out copy | Bit | The value copied in memory in case a copy has been performed. The same input value otherwise |