BrU32

JS Binary/Hexadecimal Example SRC Demo!!

Dec 4th, 2016
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. <script>
  2. var x=prompt("enter Integer:");//Grab User Input
  3. var xx=(x<<3);//Input # Into 3.
  4. var xxx=xx.toString(2);//Binary
  5. var xxxx=xx.toString(16);//Hexadecimal
  6. alert("Bin: "+xxx+" Hex :"+xxxx) //Resuly
  7. </script>
Advertisement
Add Comment
Please, Sign In to add comment