
5.7 Data Shift Instructions
5.7.2 Bit Rotate Right (ROTR)
5-115
( 3 ) Programming Example
In the following programming example, the data specified as 8 bits wide from the first bit address at MB000000 is
rotated two bits to the right.
The ROTR instruction is executed when switch 1 (DB000000) turns ON.
The following figure shows the operation when MW00000 is 12,345 (3039 hex).
0
Bit 0Bit 7Bit F Bit 3Bit B Bit 4Bit 8Bit C
Before Execution
MW00000
(3039 hex)
0 1 1 0 0 0 0 0 0 1 1 1 0 0 1
0 0 1 1 0 0 0 0 0 1 0 0 1 1 1 0
Rotated 2 bits to the right.
Data specified by the first
bit address and bit width
After Execution
MW00000
(304E hex)
Comentarios a estos manuales