Multiply (MULT)


Op Code (Hex) Extender Operand 1 Operand 2 Operand 3 Operand [4-7]
MULT 104B
Product Multiplicand Multiplier


MULTR 124B
Product Multiplicand Multiplier


MULTI 184B Indicator options Product Multiplicand Multiplier Indicator targets


MULTIR 1A4B Indicator options Product Multiplicand Multiplier Indicator targets


MULTB 1C4B Branch options Product Multiplicand Multiplier Branch targets


MULTBR 1E4B Branch options Product Multiplicand Multiplier Branch targets
Operand 1: Numeric variable scalar.

Operand 2: Numeric scalar.

Operand 3: Numeric scalar.

Operand 4-7:

Short forms


Op Code (Hex) Extender Operand 1 Operand 2 Operand [3-6]
MULTS 104B
Product/Multiplicand Multiplier


MULTSR 134B
Product/Multiplicand Multiplier


MULTIS 194B Indicator options Product/Multiplicand Multiplier Indicator targets


MULTISR 1B4B Indicator options Product/Multiplicand Multiplier Indicator targets


MULTBS 1D4B Branch options Product/Multiplicand Multiplier Branch targets


MULTBSR 1F4B Branch options Product/Multiplicand Multiplier Branch targets
Operand 1: Numeric variable scalar.

Operand 2: Numeric scalar.

Operand 3-6:

Description  The product is the result of multiplying the multiplicand and the multiplier.

Operands can have floating-point, packed or zoned decimal, signed or unsigned binary type.

Source operands are the multiplicand and multiplier. The receiver operand is the product.

If operands are not of the same type, source operands are converted according to the following rules:

  1. If any one of the operands has floating point type, source operands are converted to floating point type.

  2. Otherwise, if any one of the operands has zoned or packed decimal type, source operands are converted to packed decimal.

  3. Otherwise, the binary operands are converted as follows.

    1. If an unsigned binary(2) source operand is used with a signed binary operand of any length, the unsigned binary(2) is viewed as a signed binary(4).

    2. If both source operands are signed binary (including cases resulting from use of 3a), then a signed operation, of the length of the longer operand, is done.

    3. If both source operands are unsigned binary(2), then an unsigned 2-byte operation is done.

    4. If either source operand is unsigned binary(4), then an unsigned 4-byte operation is done with overflow detection disabled until the assignment to the receiver.

Source operands are multiplied according to their type. Floating point operands are multiplied using floating point multiplication. Packed decimal operands are multiplied using packed decimal multiplication. Unsigned binary multiplication is used with unsigned source operands, except as noted above. Signed binary operands are multiplied using two's complement binary multiplication.

Better performance can be obtained if all operands have the same type. Signed and unsigned binary multiplication execute faster than either packed decimal or floating point multiplication.

The operands must be numeric with any implicit conversions occurring according to the rules of arithmetic operations as outlined in the Arithmetic Operations.

Decimal operands used in floating-point operations cannot contain more than 15 total digit positions.

If the multiplicand operand or the multiplier operand has a value of 0, the result of the multiplication is a zero product.

For a decimal operation, no alignment of the assumed decimal point is performed for the multiplier and multiplicand operands.

The operation occurs using the specified lengths of the multiplicand and multiplier operands with no logical zero padding on the left necessary.

Floating-point multiplication uses exponent addition and significand multiplication.

For nonfloating-point computations and for significand multiplication for floating-point operations, the multiplication operation is performed according to the rules of algebra. Unsigned binary operands are treated as positive numbers for the algebra.

The result of the operation is copied into the product operand. If this operand is not the same type as that used in performing the operation, the resultant value is converted to its type. If necessary, the resultant value is adjusted to the length of the product operand, aligned at the assumed decimal point of the product operand, or both before being copied to it. Length adjustment and decimal point alignment are performed according to the rules of arithmetic operations outlined in the Arithmetic Operations.

For the optional round form of the instruction, specification of a floating-point receiver operand is invalid.

For fixed-point operations in programs that request to be notified of size exceptions, if nonzero digits are truncated from the left end of the resultant value, a size  (hex 0C0A) exception is signaled.

For floating-point operations involving a fixed-point receiver field (if nonzero digits would be truncated from the left end of the resultant value), an invalid floating-point conversion  (hex 0C0C) exception is signaled.

For a floating-point product operand, if the exponent of the resultant value is either too large or too small to be represented in the product field, the floating-point overflow  (hex 0C06) exception or the floating-point underflow  (hex 0C07) exception is signaled.

If operands overlap but do not share all of the same bytes, results of operations performed on these operands are not predictable. If overlapped operands share all of the same bytes, the results are predictable when direct addressing is used. If indirect addressing is used (that is, based operands, parameters, strings with variable lengths, and arrays with variable subscripts), the results are not always predictable.

If a decimal to binary conversion causes a size  (hex 0C0A) exception to be signaled, the binary value contains the correct truncated result only if the decimal value contains 15 or fewer significant nonfractional digits.

Resultant Conditions 

Authorization Required

Lock Enforcement

Exceptions

06 Addressing

08 Argument/Parameter

0C Computation

10 Damage Encountered

1C Machine-Dependent

20 Machine Support

22 Object Access

24 Pointer Specification

2C Program Execution

2E Resource Control Limit

36 Space Management

44 Protection Violation