Shift Right (>>) - HEIDENHAIN iTNC 530 HSCI Technical Manual

Hide thumbs Also See for iTNC 530 HSCI:
Table of Contents

Advertisement

9.8.55 SHIFT RIGHT (>>)
July 2013
>> (SHIFT RIGHT)
Syntax:
B, W, D, K
Operands:
Action:
A SHIFT RIGHT statement 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 iTNC shifts
to the right out of the accumulator are then lost. The iTNC extends the left side
of the accumulator with the correct sign.
This statement 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
= ?
Function
Load the double word D8
into the word accumulator
Shift the content of the
word accumulator to the
right by the number of
bits that are specified in
the operand.
Assign the result to
double word D12.
Instead of using the >> K+1 command four times, simply use the >> K+4
command.
9.8 Command Set
STL
Accumulator
content
L D8
3E80
>> K+1 1F40
>> K+1 FA0
>> K+1 7D0
>> K+1 3E8
= D12
3E8
Operand content
3E80
3E8
1807

Advertisement

Table of Contents
loading

Table of Contents