536
7 APPLICATION INSTRUCTIONS
7.1 Rotation Instructions
■DROL(P)
• These instructions rotate the 32-bit binary data in the device specified by (d) to the left by (n) bit(s), excluding the carry flag
(SM700). The carry flag (SM700) is on or off depending on the status prior to the execution of the DROL(P) instruction.
• When (d) is a bit device, bits are rotated to the left within the device range specified by digit specification. The number of
bits actually to be rotated is the remainder of (n)(specified number of bits). For example, when (n) is 31 and the specified
number of bits is 24, 7 bits are rotated because 31 divided by 24 equals 1 with a remainder of 7.
• Specify any value between 0 and 31 for (n). If a value 32 or bigger is specified, bits are rotated by the remainder value of
n32. For example, when (n) is 34, 2 bits are rotated to the left because 34 divided by 32 equals 1 with a remainder of 2.
■DRCL(P)
• These instructions rotate the 32-bit binary data in the device specified by (d) to the left by (n) bit(s), including the carry flag
(SM700). The carry flag (SM700) is on or off depending on the status prior to the execution of the DRCL(P) instruction.
• When (d) is a bit device, bits are rotated to the left within the device range specified by digit specification. The number of
bits actually to be rotated is the remainder of (n)(specified number of bits). For example, when (n) is 31 and the specified
number of bits is 24, 7 bits are rotated because 31 divided by 24 equals 1 with a remainder of 7.
• Specify any value between 0 and 31 for (n). If a value 32 or bigger is specified, bits are rotated by the remainder value of
n32. For example, when (n) is 34, 2 bits are rotated to the left because 34 divided by 32 equals 1 with a remainder of 2.
There is no operation error.
b0
b15
b31 b16b30 b29 b28 b27 b18 b17 b14
b5
b4 b3 b2 b1
(d)+1 (d)
(SM700)
Left rotation by (n) bits
(SM700)
b0
b15
b31 b16b30 b29 b28 b27 b18 b17 b14
b5
b4 b3 b2 b1
(d)+1 (d)
Left rotation by (n) bits