i32.shr_s
Pops two
i32
values off the stack, shift the first value to the right by the second number of bits, and then
pushes the result back on to the stack. This looks at the value as a signed integer (can be negative).
The new bit on the left (the most significant bit) will be a 1 if the number is negative, or 0 if the number is positive.
$result = $first >> $second
Stack In
i32 |
The first value to be shifted right. |
i32 |
The second value to shift the bits by. |
Stack Out
i32 |
The result of shifting the first value right by the second value's number of bits. |
Examples
i32.const 43
i32.const 2
i32.shr_s
i32.const 0xF1234567
i32.const 4
i32.shr_s