BASE CONVERTER
进制转换,二八十十六一键互转。
输入一个数和它的进制,立即得到二进制、八进制、十进制、十六进制的结果,支持大整数。
转换结果
二进制
八进制
十进制
十六进制
本页处理在浏览器本地完成
解题动画 · 按权展开
这个工具能做什么?
在二进制、八进制、十进制、十六进制之间快速换算,常用于编程、网络(IP/掩码)和学习。使用 BigInt 实现,超大整数也能精确转换。
常见问题
支持负数和小数吗?
当前支持任意大小的整数(含负数)。小数进制转换需求较少,暂未支持。
数值会上传吗?
不会。换算完全在当前浏览器内完成。
示例与注意事项Example & notes
一个例子A worked example
把 0xFF 与 255 互换:选「十六进制 → 十进制」得到 255,切到二进制则是 11111111。Swap 0xFF and 255: choose hex → decimal to get 255, switch to binary for 11111111.
注意事项Things to watch
- 支持 2–36 进制;进制再高也没有公认的字符集,因此不做支持。Bases 2–36 are supported; beyond that there is no agreed character set.
- 大数用字符串精确转换,不做浮点近似,因此不会出现末位错位。Large numbers convert exactly as strings with no floating-point rounding.
- 负数若按补码理解,需要先确定位宽(8 位与 32 位结果不同)。Two’s-complement negatives depend on bit width — 8-bit and 32-bit results differ.
相关问答More Q&A
为什么二进制负数那么长?Why is a negative binary number so long?
那是按固定位宽输出的补码表示,最高位为符号位,所以会用整段 1 填充。That is two’s complement at a fixed bit width: the leading bit is the sign, so it is padded with ones.
支持小数吗?Does it handle decimals?
支持有限位小数;无限循环小数会截断到可读位数并提示,不保证完全精确。Finite fractional digits are supported; repeating fractions are truncated to a readable length with a note.