Convert numeric literals to uint objects and output the string representations in base-2 (binary). : uint « Data Type « Flash / Flex / ActionScript






Convert numeric literals to uint objects and output the string representations in base-2 (binary).

 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        trace(new uint(51).toString(2));  // Displays: 110011
    }
  }
}

        








Related examples in the same category

1.Convert numeric literals to uint objects and output the string representations in base-16 (hexadecimal) format.