+ 3

Is there a way in JavaScript to convert numbers between Dec↔Hex, Dec↔Bin and Bin↔Hex?

Thanks in advance!

17th Jan 2017, 1:56 PM
Ltzu
Ltzu - avatar
3 odpowiedzi
+ 13
num.toString(2) <- BINary num.toString(16) <- HEXademical num.toString(8) <- OCTal num.toString(10) <- DECimal (normal nums)
17th Jan 2017, 2:26 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 3
Thanks a lot!
17th Jan 2017, 5:52 PM
Ltzu
Ltzu - avatar
0
<script language="python"> hex = int(input("Enter Value to convert to hex"),16) print(hex) </script> ???????????
17th Jan 2017, 2:17 PM
Will_De
Will_De - avatar