Using Bitwise Left Shift : Bitwise Operators : Language Flash / Flex / ActionScript examples


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

 

Using Bitwise Left Shift


 
package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var x:Number = 3;
        var y:Number = x << 2;
        
        trace(y)//12
        
        //x      0000 0000 0000 0000 0000 0000 0000 0011 
        //y      0000 0000 0000 0000 0000 0000 0000 1100 
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Language
» Bitwise Operators