High−level Instructions
3 − 279
Description
Rotates “n” bits of the 16-bit data specified by D, including carry flag data, to the right.
Example: Rotates 1 bit to the right
····
Bit position
·····
D
15 1211 8 7 4 3 0
····
Bit position
·····
D
15 1211 8 7 4 3 0
Special internal relay
R9009 (carry flag)
Carry flag data “0”
1
000101010101 0101
0101 01010101 0101
When “n” bits with carry flag data are rotated to the right,
− The data in bit position n-1 (n th bit starting from bit position 0) is transferred to special internal relay
R9009 (carry flag).
− “n” bits starting from bit position 0 are shifted out to the right and then carry flag data and the n-1 bits
starting from bit position 0 are shifted into the higher bit positions of the 16-bit data specified by D.
For n, only the lower 8 bits in the 16 bit data are valid.
15 0
n
Range of n: K0 to K255
(H00 to HFF)
Upper 8 bits
are invalid
00000000
———— ————
Precaution during programming
If the specified “n” is a multiple of 17 bits, the data will be the same as that before the operation.
e.g.,n = K17: same operation as n = K0
n = K18: same operation as n = K1
n = K34: same operation as n = K0
n = K35: same operation as n = K1
Flag conditions
・Error flag (R9007): Turns on and stays on when the area specified using the index modifier
exceeds the limit.
・Error flag (R9008): Turns on for an instant when the area specified using the index modifier
exceeds the limit.
・Carry flag (R9009): Turns on for an instant when the data in bit position n-1 is recognized as 1.