Logic

Navigation:  Component Reference >

Logic

Previous pageReturn to chapter overviewNext page

If-Then-Else

 

clip0222

 

The If-Then-else component allows you carry out cascading conditional statements. It works as follows:

 

Initially the component will show a single 'If/Then' pair of nodes, and an 'Else' node. The 'If' node is used to evaluate True or False, where true is represented by 1 and false is represented by 0. Any input other than a 0 or a 1 is treated as a null input, and a null output is given for any band it is present in.

 

clip0223

 

As shown above, initially each node on the component is set to 'Auto', meaning that once a data type is connected, each node will take the form of the connected data type.

 

Once a connection is made, to either of the pair of free If/Then nodes, two more will be provided to facilitate the cascading conditional statements. This is illustrated below.

 

clip0224

 

As the above shows, once an input is connected, additional 'Else If/ Then' nodes are added to the module. This can be done indefinitely, meaning as many if - then - else if - then etc. statements can be evaluated as required.

 

The 'If' evaluation happens from top to bottom, meaning that when inputs are evaluated, the closest to the top of the module found to be 'True' will send the subsequent 'Then' through to the 'Result' node. The evaluation is carried out on a band-by-band basis. If no 'If' nodes are found to be 'True', any input connected to the 'Else' node will be sent to the 'Result' node.

 

Highlighting

 

When highlighting a chain in which a 'If.Then-Else' component is located, the highlighting will illustrate which of the nodes are active in sending data through, as illustrated in the following figure.

 

clip0225

 

Where multiple nodes are active, for example if octave bands are being used and different nodes are evaluated as 'True', any chain that is active will be highlighted. This is illustrated below.

 

clip0226

 

Interpreter

 

clip0227

 

Similar to the 'Conditional' component, the 'Interpreter' component evaluates the inputs connected to it against the selected comparator and sends either 'True' (1) or 'False' (0) to the output node. This is illustrated as follows. These are intended to be used in conjunction with the 'If-Then-Else' component.

 

clip0228

 

 

Logic AND        

 

clip0229

 

The Logic AND component will carry out a Boolean logic AND assessment of any values connected to it, i.e. it will output TRUE (1) only if all the values connected to it are also TRUE (1).

 

Logic OR

 

clip0233

 

The Logic OR component will carry out a Boolean logic OR assessment of any values connected to it, i.e. it will output TRUE (1) if any of the values connected to it are also TRUE (1).

 

Logic XOR

 

clip0235

 

The Logic XOR component will carry out a Boolean logic XOR assessment of any values connected to it, i.e. it will output TRUE (1) only if at least one but not all of the values connected to it are TRUE (1).

 

Logic NOT

 

clip0232

 

The Logic NOT component will carry out a Boolean logic NOT assessment of the value connected to it, i.e. it will output the inverse of the input, meaning if the input is TRUE (1) it will output FALSE (0) and vice versa.

 

Logic NAND

 

clip0230

 

The Logic NAND component will carry out a Boolean logic NAND assessment of any values connected to it, i.e. it will output FALSE (0) only if all the values connected to it are also TRUE (1).

 

Logic NOR

 

clip0231

 

The Logic NOR component will carry out a Boolean logic NOR assessment of any values connected to it, i.e. it will output FALSE (0) if any of the values connected to it are TRUE (1).

 

Logic XNOR

 

clip0234

 

The Logic XNOR component will carry out a Boolean logic XNOR assessment of any values connected to it, i.e. it will output FALSE (0) only if at least one but not all of the values connected to it are TRUE (1).