Implements an adder-subtractor that operates on bit patterns. AddSub nodes may be cascaded and pipelined to achieve higher throughput rates. This node supports scalar Boolean values, arrays of Boolean values, and scalar values of integer and fixed-point data types.

## carry in/inverted borrow in

A Boolean that determines whether this node accounts for an additional LSB. For example, the LSB could come from the bit pattern of the **carry out/inverted borrow out** output of an upstream AddSub node. If **sub?** is FALSE and **carry in/inverted borrow in** is TRUE, this node adds one extra LSB to **x** + **y**. If **sub?** is TRUE and **carry in/inverted borrow in** is FALSE, this function subtracts one extra LSB from **x** – **y**.

**Default: **FALSE

## bypass x

A Boolean that determines whether this node ignores the value you wire to **x**. Use this Boolean to remove **x** from the expression this node calculates. For example, use this Boolean to return –**y** instead of **x** – **y**.

## sub?

A Boolean that determines whether this node performs subtraction or addition. Use this Boolean to change the operation of this node programmatically.

TRUE |
The node calculates **x** - **y**. |

FALSE |
The node calculates **x** + **y**. |

**Default: **FALSE

## x

An input to this node. If **x** is a fixed-size Boolean array, the first array element represents the least-significant bit (LSB) and the last element represents the most-significant bit (MSB).

## y

An input to this node. If **y** is a fixed-size Boolean array, the first array element represents the LSB and the last element represents the MSB.

## overflow

A Boolean that indicates if the theoretical computed value of the sum exceeds the valid range of the data type of the sum.

TRUE |
This function wraps the value of **sum**. |

FALSE |
This function does not wrap the value of **sum**. |

**Note**
If you cascade functions, you must use unsigned functions in the intermediate operations. Then set the encoding of the final function to the encoding you want for the entire cascaded operation.

## sum

The result this node computes. The result depends on not only the values of **x** and **y**, but also the values of any Boolean inputs. This node applies the Wrap overflow mode to **sum** in the following situations: **sub?** is TRUE and **carry out/inverted borrow out** returns FALSE, **sub?** is FALSE and **carry out/inverted borrow out** returns TRUE.

**Installed By: **LabVIEW Communications System Design Suite (introduced in 1.0)

**Where This Node Can Run: **

Desktop OS: none

FPGA: All devices