Made to Order Software Corporation Logo

Shift Right

SWF Action
Action Category: 
Arithmetic
Action Details: 
0
Action Identifier: 
100
Action Structure: 
<n.a.>
Action Length: 
0 byte(s)
Action Stack: 
pop 2 (i), push 1 (i)
Action Operation: 
i1 := pop();
i2 := pop();
r := i2 >> i1;
push(r);
Action Flash Version: 
5

Pop two integers, shift the 2nd signed integer by the number of bits specified by the first integer and push the result back on the stack.

To right shift an unsigned integer, use Shift Right Unsigned instead.

This action repeats the sign bit of the integer being shifted. This means negative numbers remain negative and positive numbers remain positive.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Syndicate content