Math Menu

Unity

The input is passed to the output unchanged.

Multiply

The two inputs are multiplied. If the result is greater than 127, the output is 127, and the overflow LED will light.

Divide

The top input is divided by the bottom input. Division by 0 gives an output of 0.

Modulus

The top input is divided by the bottom input and the remainder is sent to the output. Modulus is handy for setting roll over limits. For example to roll over at 12, put the index into the top input, and 12 into the bottom input. Then the input index will roll over at 11, giving a 12-count output of 0-11.

Multiply-Divide

The Multiply-Divide (MulDiv) module multiplies the top two inputs (labeled with "X") using internal registers not limited to the 0-127 range, and then divides the result by the bottom input (labeled "/"). If the divide input is 0, division is not done. If the result is greater than 127, the output is 127, and the overflow LED will light.

Multiply-Add

The Multiply-Add (MulAdd) module multiplies the top two inputs (labeled with "X"), and then adds bottom input (labeled "+"). If the result is greater than 127, the output is 127, and the overflow LED will light.

 

Percent

The output is the percent (bottom input) of the value in the top input.

If the bottom (percent) input exceeds 100, the output will be larger than the top (source) input. For example 120% (bottom input) of 100 (top input) will give an output result of 120.

Add Add2

The output is the sum of the inputs. If the sum exceeds 127, the output remains at 127, and the overflow LED will light..

Add-Divide

The Add-Divide (AddDiv) module adds the three top inputs (labeled "+) using internal registers not limited to the 0-127 range, and then divides the result by the bottom input (labeled "/"). If the divide input is 0, division is not done. If the result is greater than 127, the output is 127, and the overflow LED will light.

The 3rd "+" input can be made to subtract instead of add by clicking on the Sub checkbox.

Minus

The output is result of the bottom input subtracted from the top input. If the result is < 0, the output will be set to 0, and the carry "Cy" LED will light. The underflow value (the absolute difference when the result is negative) may be read by the Carry module, below.

Carry

Carry signals when a Minus module has an underflow, and it makes the value of the underflow - the absolute value of theMinus module's subtract operation - available to be used as the value itself or as a True/False flag that can trigger switches or other processes when there is a subtraction underflow. This is because the output will be at 0 when there is no underflow at the Minus module, and it will be the carry value when there is. Since SoftStep logic reads 0 as False and any non zero as True, the carry output works either way.

Carry can be seen as a satellite to the Minus module. Each Carry module must be told which Minus module it is to take its output from. Do this by setting the red drop down menu to the same number as the controlling Minus module. If you have created only one Minus module, then the only choice will be 1, and it will be set by default

SoftStep is Copyright © 1999-2004 by John Dunn and Algorithmic Arts. All Rights Reserved.