Using the Compound Arithmetic Function in LabVIEWPrimary Software: LabVIEW Development Systems>>LabVIEW Base Package
Primary Software Version: 6.0
Primary Software Fixed Version: N/A
Secondary Software: N/A
I am using the Compound Arithmetic function with the XOR operation in LabVIEW. This function seems to act differently compared to using individual XOR functions. What method does the Compound Arithmetic function use for calculating the XOR result?
The Compound Arithmetic function performs arithmetic on one or more numeric, array, cluster, or Boolean inputs. You can select the math operation (Add, Multiply, AND, OR, or XOR) by right-clicking the function and selecting Change Mode from the shortcut menu. The default mode depends on the palette from which you drop this function. If you drop this function from the Numeric palette, the default mode is Add. When you drop this function from the Boolean palette, the default mode is OR.
When you use the Compound Arithmetic function to perform an XOR operation on 3 or more values, the Compound Arithmetic function performs a XOR operation on the first pair of inputs, and then performs a XOR operation on the result of the first pair of inputs and the next input, and so on until all inputs have been processed.
With the XOR operation, if both inputs are TRUE or both inputs are FALSE, the function returns FALSE. Otherwise, it returns TRUE.
Below are two screenshots of programs that demonstrate the equivalent behavior.
Using the Compound Arithmetic function
Using Individual XOR functions
Report Date: 12/06/2005
Last Updated: 03/02/2006
Document ID: 3S5GFN6S