The following instructions perform arithmetic operations between rA and rX register and memory contents.
ADD
rA <- rA +V
.
SUB
rA <- rA - V
.
MUL
rAX <- rA x V
.
DIV
rA <- rAX / V
, rX
<- reminder.
In all the above instructions, [rA] is one of the operands of the binary arithmetic operation, the other being V (that is, the specified subfield of the memory cell with address M), padded with zero bytes on its left-side to complete a word. In multiplication and division, the register X comes into play as a right-extension of the register A, so that we are able to handle 10-byte numbers whose more significant bytes are those of rA (the sign of this 10-byte number is that of rA: rX's sign is ignored).
Addition and substraction of MIX words can give rise to overflows, since the result is stored in a register with room to only 5 bytes (plus sign). When this occurs, the operation result modulo 1,073,741,823 (the maximum value storable in a MIX word) is stored in rA, and the overflow toggle is set to TRUE.