﻿

# Compound Arithmetic Function

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Owning Palette: Numeric Functions

Requires: Base Development System

Performs arithmetic on one or more numeric, array, cluster, or Boolean inputs. To select the operation (Add, Multiply, AND, OR, or XOR), right-click the function and select Change Mode from the shortcut menu. When you select this function from the Numeric palette, the default mode is Add. When you select this function from the Boolean palette, the default mode is OR.

The connector pane displays the default data types for this polymorphic function.

 value 0..n-1 can be a number or Boolean value, an array of numbers or Boolean values, a cluster, array of clusters, and so on. You can wire a waveform to only one value input. If an input is a waveform, you can have an unlimited number of scalar inputs of varying sizes. If value is an error cluster, only the status parameter of the error cluster passes to the input terminal. result returns the result of the selected operation applied to the value 0..n-1. For AND, OR, or XOR, result returns the bitwise operations on numeric inputs and logical operations on Boolean inputs.

## Compound Arithmetic Details

Add inputs to the node by right-clicking an input and selecting Add Input from the shortcut menu or by resizing the function.

You can invert the inputs or the output of this function by right-clicking the individual terminals and selecting Invert from the shortcut menu. For Add, select Invert to negate an input or the output. For Multiply, select Invert to use the reciprocal of an input or to produce the reciprocal of the output. For AND, OR, or XOR, select Invert to bitwise complement an integer input or output or to logically negate an input or output.

When you use the Compound Arithmetic function to perform an XOR operation on 3 or more values, the Compound Arithmetic function performs an XOR operation on the first pair of inputs, then performs an XOR operation on the result of the first pair of inputs and the next input, and so on until all inputs have been processed.

 Note  You cannot use this function with fixed-point numbers. If you wire fixed-point numbers to this function, the VI appears with a broken Run button.