Reference Manual
PMAC 2 Software Reference 
PMAC Mathematical Features  363 
^ 
Function 
"Bit-by-bit “exclusive or” 
Remarks 
The ^ sign implements the bit-by-bit logical “exclusive or” (xor) of the numerical value 
preceding it and the numerical value following it. A given bit of the result is equal to 1 
if the matching bits of the two operands are different from each other. The operation is 
done both on integer bits and fractional bits (if any). 
Multiplication, division, modulo (remainder), and bit-by-bit “and” operations have 
higher priority than addition, subtraction, bit-by-bit “or”, and bit-by-bit “exclusive-or” 
operations. Operations of the same priority are implemented from left to right. 
Example 
Operation Result 
2^1 
3 
2^2 
0 
5^7 
2 
$AA^$55 
$FF 
3^-3 
-2 
0.5^0.875 
0.375 
Mathematical Functions 
ABS 
Function 
Absolute value 
Syntax 
ABS({expression}) 
Domain 
All real numbers 
Domain units 
User-determined 
Range 
Non-negative real numbers 
Range units 
User-determined 
Remarks 
ABS implements the absolute-value, or magnitude function of the mathematical 
expression contained inside the following parentheses. 
Example 
P8=ABS(P7)  ; Computes magnitude of P7 
IF(Q200!=0)  ; Divide by 0 check 
 Q240=ABS(Q200)/Q200 ; Computes sign (-1 or 1) of Q200 
ELSE 
 Q240=0  ; Sign value is 0 
ENDIF










