Load Two's Complement (L-) - HEIDENHAIN TNC 426 PB/M Technical Manual

Table of Contents

Advertisement

7.7.5 LOAD TWO'S COMPLEMENT (L–)
Function
Load byte B5 into
the word
accumulator, invert
the algebraic sign.
Add the contents of
the word
accumulator and
byte B6.
Assign the gating
result to byte B8.
7 – 90
Syntax:
L– (LOAD MINUS)
Operands:
B, W, D, K
Action:
Load the two's complement of the addressed operand, or of a constant, into
the word accumulator. If necessary, the TNC supplements the accumulator
with the correct algebraic sign. The two's complement allows negative
numbers to be stored, i.e., a number loaded with the L command appears in
the accumulator with an inverted sign. This command can be used only with
word execution.
Example:
Negate the content of byte B5 and then add it to the content of byte B6.
Assign the result to byte B8.
Initial state:
Byte
B5
= 15 (dec)
Byte
B6
= 20 (dec)
Byte
B8
= ?
STL
Accumulator contents [bit]
31..15 ..................... 7 ................. 0
L– B5
1 ..... 1 1 1 1 1 1 1 1
+ B6
0 ..... 0 0 0 0 0 0 0 0
= B8
0 ..... 0 0 0 0 0 0 0 0
To aid understanding of this example, the contents of the accumulator and
operands are shown as decimal values in parentheses.
1
1
1
1
0 0 0 1
(
1
5
)
0
0
0
0 0 1 0 1
(
+
5
)
0
0
0
0 0 1 0 1
(
+
5
)
HEIDENHAIN Technical Manual TNC 426, TNC 430
Operand contents [bit]
7 ...........
0
0
0
0
1
1 1 1
(
+
1
5
)
0
0
0
1
0
1 0 0
(
+
2
0
)
0
0
0
0
0 1 0 1
(
+
5
)
0

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tnc 430 pa/mTnc 430 mTnc 426 cbTnc 430 caTnc 426 pbTnc 430 pa ... Show all

Table of Contents