Skip to main content

IAR Embedded Workbench for Arm 9.70.x

>> Logical shift right

In this section:
Precedence

4

Description

>> or the synonym :SHR: shifts the left operand, which is always treated as unsigned, to the right. The number of bits to shift is specified by the right operand, interpreted as an integer value between 0 and 32.

Note

The precedence of :SHR: is 2.5.

Example
01110000B >> 3 –> 00001110B
1111111111111111B >> 20 –> 0
14 >> 1 –> 7