Op Code (Hex) | Extender | Operand 1 | Operand 2 | Operand [3-6] |
---|---|---|---|---|
NEG 1056 |
| Receiver | Source |
|
| ||||
NEGI 1856 | Indicator options | Receiver | Source | Indicator targets |
| ||||
NEGB 1C56 | Branch options | Receiver | Source | Branch targets |
Operand 2: Numeric scalar.
Operand 3-6:
Op Code (Hex) | Extender | Operand 1 | Operand [2-5] | |
---|---|---|---|---|
NEGS 1156 |
| Receiver/Source |
| |
| ||||
NEGIS 1956 | Indicator options | Receiver/Source | Indicator targets | |
| ||||
NEGBS 1D56 | Branch options | Receiver/Source | Branch targets |
Operand 2-5:
Description: The numeric value in the source operand is changed as if it had been multiplied by a negative one (-1). The result is placed in the receiver operand.
The sign changing of the source operand value (positive to negative and negative to positive) is performed as follows:
The result of the operation is copied into the receiver 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 receiver operand, aligned at the assumed decimal point of the receiver 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. If significant digits are truncated on the left end of the resultant value, a size (hex 0C0A) exception is signaled. An attempt to negate a maximum negative signed binary value to a signed binary scalar of the same size also results in a size (hex 0C0A) exception. If a packed or zoned 0 is negated, the result is always positive 0.
When the source floating-point operand represents not-a-number, the sign field of the source is not forced to positive and this value is not altered in the receiver.
For a fixed-point operation, if significant digits are truncated from the left end of the resultant value, a size (hex 0C0A) exception is signaled. An attempt to negate a maximum negative binary value into a binary scalar of the same size also results in a size (hex 0C0A) exception.
For floating-point operations that involve a fixed-point receiver, 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 receiver operand, if the exponent of the resultant value is either too large or too small to be represented in the receiver, the floating-point overflow (hex 0C06) exception and the floating-point underflow (hex 0C07) exception are signaled.
If a decimal to binary conversion causes a size (hex 0C0A) exception to be signaled or if the size exception was suppressed, the binary value contains the correct truncated result only if the decimal value contains 15 or fewer significant nonfractional digits.
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