Shift Right (>>) - HEIDENHAIN TNC 426 PB/M Technical Manual

Table of Contents

Advertisement

7.7.56 SHIFT RIGHT (>>)
Function
STL
Load the double
L D8
word D8 into the
word
accumulator.
Shift the content
>>
of the word
K+1
accumulator to
>>
the right by the
K+1
number of bits
>>
that are specified
K+1
in the operand.
>>
K+1
Assign the result
= D12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 3 E8
to double word
D12.
7 – 136
Syntax:
>> (SHIFT RIGHT)
Operands:
B, W, D, K
Action:
A SHIFT RIGHT instruction divides the content of the word accumulator by
two. This is done by simply shifting the bits by one place to the right. You
define the number of shifts through the operand. The bits that the TNC shifts
to the right out of the accumulator are then lost. The TNC extends the left side
of the accumulator with the correct sign.
This instruction is one of the arithmetic commands because it includes the
sign bit. For this reason, and to save time, you should not use this command
to isolate bits.
Example:
Shift the content of double word D8 four times to the right, then assign it to
double word 12.
Initial state:
Double word D8
= 3E 80 (hex)
Double word D12
= ?
The accumulator content is shown here in binary notation; the operand
content in hexadecimal notation.
Accumulator contents [bit]
x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 3 E 8 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 1 0 0 0
Instead of using the >> K+1 command four times, simply use the >> K+4
command.
HEIDENHAIN Technical Manual TNC 426, TNC 430
Operand
content (hex)

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