Commented 14 years ago2010-07-28 03:45:36 UTCComment #38422
I wrote translators. From binary: javascript:var r="";for(var i=0,a=prompt().split(" ");i<a.length;++i){if(a[i].length>8){a.splice(i+1,0,a[i].substr(8));a[i]=a[i].substr(0,8);}r+= String.fromCharCode(parseInt(a[i],2));}alert(r);
To binary: javascript:var r=[];for(var i=0,a=prompt();i<a.length;++i){r[i]=a.charCodeAt(i).toString(2);while(r[i].length<8){r[i]="0"+r[i];}}alert(r.join(" "));
101010 ?
javascript:var r="";for(var i=0,a=prompt().split(" ");i<a.length;++i){if(a[i].length>8){a.splice(i+1,0,a[i].substr(8));a[i]=a[i].substr(0,8);}r+= String.fromCharCode(parseInt(a[i],2));}alert(r);
To binary:
javascript:var r=[];for(var i=0,a=prompt();i<a.length;++i){r[i]=a.charCodeAt(i).toString(2);while(r[i].length<8){r[i]="0"+r[i];}}alert(r.join(" "));
01010000 01101111 01110100 01100001 01110100 01101111 01100101 01110011 00100000 01100001 01110010 01100101 00100000 01110100 01100001 01110011 01110100 01111001 00101110
Edit: Wait a second, I think it's his birthday! Happy birthday!
Happy Birthday!!
That's unacceptable!
But thanks guys.