Use Bitwise Unsigned Right Shift : Bitwise Operators : Language Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Language » Bitwise Operators »

 

Use Bitwise Unsigned Right Shift


 
package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){

            var x:Number = -12;
            var y:Number = x >>> 2
            trace(y);                // y = 1073741821
            
            //x      1111 1111 1111 1111 1111 1111 1111 1011 
            //y      0011 1111 1111 1111 1111 1111 1111 1101 
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Language
» Bitwise Operators