binary conversion
Im having a problem with this code to convert decimal to binary ive got the formula but it wont print to the screen_txt only on the console and also my calculator wont let me change any other number other than 3 so if i press 7 binary should be 111 but it stays 11...
var num: Number;
var inputVal:Number;
var calculatedVal:Number;
binary_btn.addEventListener(MouseEvent.CLICK, binaryBtn);
function binaryBtn(event:MouseEvent) : void
{
inputVal = Number(screen_txt.text);
var num:Number = parseInt (, 10);
trace (num.toString(2));
trace(inputVal);
calculatedVal = Number(num);
screen_txt.text = calculatedVal.toString();
}