6F3B0250
184 T1/T1S User’s Manual
7. Instructions

FUN 070 SHR n bit shift right

Expression
Input -[
A
SHR
n
®
B
]- Output
Function
When t he input is O N, the data of register
A
is shift ed
n
bits to the right ( LSB direction) including the
carry flag (CF = S050), and stored in
B
. 0 is stored in upper
n
bits. After the operation, if the right most
bit (LSB) is O N, the output is t ur ned ON.
Execution condition
Input Operation Output CF
OFF No execution OFF -
ON Execution When LSB = 1 ON Set or reset
When LSB = 0 OFF Set or reset
Operand
Name Device Re
g
ister Constant Index
X Y R S T. C. XW YW RW SW T C D I J K
A
Source ÖÖÖÖÖÖÖÖÖÖ Ö Ö
n
Shift bits 1 - 16
B
Destination ÖÖÖÖÖÖÖÖÖ Ö
Example
When X 007 is changed fr om O FF to ON, the dat a of RW18 is shifted 5 bits t o t he right and the
result is st or ed in RW20.
The figure below shows an operation example.
(MSB) (LSB)
FEDCBA9876543210
RW18 0100001010011010
CF
RW20 0000001000010100 1
(Result)
0 R001 is turned OFF
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net