Function that performs a logical shift to the right of the specified number of bits.
Syntax |
i32 shr (i32 value, i32 nBit) |
---|---|
value |
Variable on which to perform the shift |
nBit |
Number of bits to be shifted |
result |
Returns the result of the shift |
Validity |
Rule, Task |
Note |
In right shift the lightest outgoing bit is lost, the heaviest bit always enters 0 (sign is lost). To keep the sign use r_shr() |
Example of use:
|