二进制转换十六进制(2进制转16进制公式)
生活百科 2022-08-04 08:51www.17kangjie.cn生活百科
1、先使用parseInt()函数将二进制转换为十进制,语法“parseInt(string,2);”;然后使用toString()函数将十进制转换为十六进制即可,语法格式“number.toString(16)”。
1、先使用parseInt()函数将二进制转换为十进制,语法“parseInt(string,2);”;然后使用toString()函数将十进制转换为十六进制即可,语法格式“number.toString(16)”。