Skip to main content
SiteIndex
开发者可以使用

转换二进制、十进制和十六进制数值

在二进制、十进制和十六进制之间转换非负整数,也可批量转换同一进制的数值列表。

使用指南

交互式工具区

无需注册账号
数字进制转换器

Binary (base 2)

0b11111111

Octal (base 8)

0o377

Decimal (base 10)

255

Hexadecimal (base 16)

0xFF

Base 10 → base 2: 0b11111111

112816413211618141211
Step-by-step conversion

Positional expansion in base 10: 2×10^2 + 5×10^1 + 5×10^0 = 255

Decimal to base 2, divide by the target base and read remainders from bottom to top:

  1. 255 ÷ 2 = 127 remainder 1
  2. 127 ÷ 2 = 63 remainder 1
  3. 63 ÷ 2 = 31 remainder 1
  4. 31 ÷ 2 = 15 remainder 1
  5. 15 ÷ 2 = 7 remainder 1
  6. 7 ÷ 2 = 3 remainder 1
  7. 3 ÷ 2 = 1 remainder 1
  8. 1 ÷ 2 = 0 remainder 1
批量转换

Convert a list of numbers in the selected input base, one value per line.

Quick reference (0–255)

DecimalBinaryHexOctal
0000
81000810
101010A12
16100001020
25511111111FF377

Hex is useful for compact byte values and memory addresses. Octal is used in Unix permissions (for example, 755). Binary can be grouped into fours to convert to hexadecimal.

Common questions: Base 16 uses digits 0–9 and A–F. Octal 755 represents file permissions. Prefixes 0b, 0o and 0x select binary, octal and hexadecimal automatically.

数字进制转换器是什么?

在二进制、十进制和十六进制之间转换非负整数,也可批量转换同一进制的数值列表。

工作原理

在二进制、十进制和十六进制之间转换非负整数,也可批量转换同一进制的数值列表。

常见用途

在二进制、十进制和十六进制之间转换非负整数,也可批量转换同一进制的数值列表。

使用限制

结果可能因浏览器、网络、输入内容和外部服务而异。本工具仅供参考,不能替代专业诊断或建议。

常见问题
数字进制转换器是什么?
在二进制、十进制和十六进制之间转换非负整数,也可批量转换同一进制的数值列表。

相关工具