logic

Parameters

Parameter label

I/O type

Data type

Mandatory parameter?

Default value

inputVec1

input

vector

yes

N/A

inputVec2

input

vector

no

N/A

operator

input

string ("and" / "or" / "xor" / "not")

no

"and"

outputVec

output

vector

N/A

N/A

Functionality

Depending on the value of operator, the module performs an element-wise OR, XOR (exclusive or), or AND logic operation between the elements of inputVec1 and inputVec2. If operator="not", all elements of inputVec1 will be negated. In that case, inputVec2 does not have to be defined.

Here are two examples:

inputVec1 = [True,False,False,True]
inputVec2 = [False,False,True,True]
operator = "or"
...
outputVec = [True,False,True,True]
inputVec1 = [True,False,False,True]
operator = "not"
...
outputVec = [False,True,True,False]