| |||
| Home > Symbols, Literals, Expressions, and Operators > Shift operators | |||
Shift operators act on numeric expressions, shifting or rotating the first operand by the amount specified by the second.
Table 29 shows the shift operators.
Table 29. Shift operators
Operator | Alias | Usage | Explanation |
|---|---|---|---|
|
| Rotate A left by B bits | |
|
| Rotate A right by B bits | |
| << |
| Shift A left by B bits |
| >> |
| Shift A right by B bits |
SHR is a logical shift and does not propagate
the sign bit.