Function that performs an arithmetic shift to the right of the specified number of bits.
Syntax |
i32 r_shr (i32 value, i32 nBit) |
---|---|
value |
Unit on which to perform the shift |
nBit |
Number of bits |
result |
Returns the result of the shift |
Validity |
Rule, Task |
Note |
In right shift the lightest bit exiting to the right is lost. In the heaviest bit a 0 enters if it was in 0 a 1 enters if it was in 1 (sign is kept) |
Example usage:
Example usage:
Example usage:
|