F

进制转换Number Base Converter

二进制、八进制、十进制、十六进制互转Convert between binary, octal, decimal and hexadecimal.

转换结果

二进制0b11111111
八进制0377
十进制255
十六进制0xff

关于 进制转换About Number Base Converter

底层开发、颜色值、权限位、报文调试中经常需要在二进制、八进制、十进制、十六进制之间来回换算。本工具支持四种进制实时互转,输入任意一种,其余结果同步更新,免去手算与心算。Low-level development, colour values, permission bits and packet debugging all demand switching between binary, octal, decimal and hexadecimal. This tool converts among the four bases in real time — type any one and the rest update instantly, no mental arithmetic required.

使用方法How to Use

  1. 在任意进制的输入框中填写数值(如十六进制 1F)。Type a value into any base’s input box (e.g. hex 1F).
  2. 其余进制的结果实时更新展示。The other bases update in real time.
  3. 复制所需进制的结果用于代码或文档。Copy the representation you need into code or documentation.

常见问题FAQ

十六进制常见于哪些场景?Where is hexadecimal commonly used?

颜色值(#RRGGBB)、内存地址、字节报文、文件权限位(如 0755)等,十六进制能以更短的写法表达二进制内容。Colour values (#RRGGBB), memory addresses, byte dumps and file permission bits (e.g. 0755) — hex expresses binary content more compactly.

手工换算的思路是什么?How does manual conversion work?

十进制转其他进制用“除基取余、逆序排列”;其他进制转十进制用“按权展开求和”。理解原理后,用本工具快速核对结果。From decimal, repeatedly divide by the base and read remainders in reverse; to decimal, expand by positional weights and sum. Once you understand the principle, use this tool to verify quickly.

支持小数换算吗?Does it convert fractions?

本工具面向整数换算。小数需将整数与小数部分分开处理,日常调试场景整数换算已覆盖绝大多数需求。The tool focuses on integers. Fractions require separating integer and fractional parts; in everyday debugging, integer conversion covers the vast majority of needs.

相关阅读Related Reading

相关工具Related Tools