🔢 Base / Radix Converter
📐 工作原理与说明
前缀识别决定输入进制:0x / 0X 按 16 进制、0b / 0B 按 2 进制、0o / 0O 按 8 进制,其余按 10 进制解析;解析用 BigInt 完成,超过 2^53 的整数也逐位精确;自定义进制按输入基数(默认 36)用 BigInt 取模输出;输入超过 4096 字符或格式非法时提示并清空结果
Convert numbers between binary, octal, decimal, hexadecimal and any custom base, with text and ASCII support.
Conversion results across bases can be exported as a CSV comparison table
💡 ASCII / Unicode 转换
📚 深度解析:进制转换
💡 常见使用场景
- 2/8/10/16 互转。
- 调试寄存器位掩码时在 16 进制与 2 进制间反复核对,快速定位哪一位写错。
换算
255(10)=FF(16)=11111111(2)。
❓ 常见问题(FAQ)
- 负进制?
- 本工具支持常用正进制。
- 支持小数转换吗?
- 主要面向整数与字符编码;进制小数受有限精度限制,不建议用于需要高精度的场景。
Formula & Standard References
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Place value expansion | value = sum of digit times base raised to its position | Numeral system theory |
| Sign notation | Negative numbers get a leading minus sign with the absolute value converted digit by digit; no fixed-width two's complement or IEEE 754 floating-point encoding is provided. | This implementation |
| Digit alphabet | Digits 2–62 follow 0–9, A–Z, a–z, case-sensitive | This implementation |
⚠️ 使用说明与注意事项
- 本工具纯前端运行,数据不会上传到服务器
- 建议在主流浏览器(Chrome/Safari/Firefox/Edge)中使用
- 计算结果仅供参考,请以实际应用场景为准