Click here to return to the Basic DSP page
The Bitwise Logic block applies one of five selectable logic operations to each bit of the two input signals and outputs the result on the output pin. And, Or, Nand, Nor, and Xor operators are available.
Unlike the normal Logic - And, Or, Nand, Nor cell, which applies the logic operation to the full data word from each input, this cell applies the logic operation to each bit in each word. The first bit in each of the two words are used to create the first bit in the output word, the second bit in each of the two words are used to create the second bit in the output word, and so on.
To change the operator:
Left click on the icon button, each click will toggle the active operator which is shown in the icon image and label.
Note: the operator is a compile time settings you will have to compile and download the project each time you change the operator.