进制转换器
瞬间在二进制、八进制、十进制和十六进制之间转换数字,支持批量模式、位长预览和一键复制。
输入任意进制的数字(例如:1010, 0xFF, 755)
Options
Bitwise Operations
Leave Operand empty for NOT operation.
转换结果
Enter a number to see conversion results
什么是数字系统?
数字系统是表示和处理数字的不同方式。二进制只使用0和1(基数2),八进制使用数字0-7(基数8),十进制使用数字0-9(基数10),十六进制使用数字0-9和字母A-F(基数16)。每个系统在计算和数学中都有特定的用途。
二进制
基数2
使用数字:0, 1
例如:1010
八进制
基数8
使用数字:0-7
例如:755
十进制
基数10
使用数字:0-9
例如:123
十六进制
基数16
使用:0-9, A-F
例如:FF
为什么不同的数字系统很重要?
计算机科学
计算机内部使用二进制,而程序员经常使用十六进制来表示内存地址
系统管理
Unix/Linux系统中的文件权限通常用八进制表示(如755)
具体功能
主要功能
双向转换
瞬间在任意进制间转换
批量处理
一次处理最多1000个数字
位长度预览
查看转换数字的位和字节长度
自动检测
自动检测输入数字的进制
导出选项
下载CSV或JSON格式的结果
历史记录
跟踪最近的转换记录
为什么选择我们的进制转换器?
我们的进制转换器比其他在线工具提供更优秀的性能和功能。
常见使用场景
软件开发
调试二进制协议,转换内存地址,分析位模式
计算机科学教育
学习数字系统,理解二进制运算,研究数据表示
系统管理
配置网络设置,分析日志文件,处理文件权限
数字电子学
设计电路,分析信号,使用微控制器
如何使用
单个数字转换
- 1 在输入框中输入您的数字
- 2 选择源进制或使用自动检测
- 3 查看所有进制的转换结果
- 4 根据需要复制或下载结果
批量转换
- 1 切换到批量模式
- 2 输入多个数字,每行一个
- 3 点击转换处理所有数字
- 4 以CSV或JSON格式导出结果
技术细节
精度和限制
转换器使用JavaScript的BigInt处理大数字,确保即使是非常大的值也能保持精度。超过1024位的数字会显示性能警告,但仍能正确转换。
前缀处理
工具自动识别编程前缀:0b表示二进制,0o表示八进制,0x表示十六进制。这些前缀是可选的,如果与选定的进制冲突,将被忽略。
溢出检测
转换器检测潜在的溢出情况并提供警告。对于有符号整数,它显示有符号和无符号两种解释。
输入验证
每个输入都会根据选定的进制规则进行验证。无效字符会被高亮显示,并提供纠正建议。
常见问题
What number bases are supported?
Our tool supports bases 2-36, including common ones like binary (2), octal (8), decimal (10), and hexadecimal (16).
How do I convert negative numbers?
Enter negative numbers with a minus sign. The tool handles two's complement representation for binary and other bases appropriately.
What's the maximum number size supported?
JavaScript's safe integer limit is 2^53-1. For larger numbers, precision may be lost. Use specialized tools for arbitrary precision arithmetic.
Can I convert decimal fractions?
Currently, our tool supports integer conversion only. Fractional base conversion requires more complex algorithms and may be added in future versions.
What are the practical uses of different bases?
Binary (base 2) for computer science, octal (base 8) for Unix permissions, hexadecimal (base 16) for colors and memory addresses, base 64 for encoding.