功能开发中
整数进制转换器
在不同进制间转换整数。
占位:转换结果
使用教程
- 在任意一个 (ANY ONE) 进制输入框 (input box of ANY base) 中输入数字 (type in a number):
- 其他三个 (the other three) 进制的输出结果框会自动同步显示 (auto-populate with converted values):
- 处理负数 (Negative Numbers) 时:
- 选择合适的位宽 (bit-width): 8 / 16 / 32 / 64 bit
- 查看底部的 "内存字节表示" (Memory Byte Representation) 区域:
- 点击各结果的复制 (Copy) 按钮 (icon button) 获取对应进制字符串 (string)
使用场景
- 嵌入式 C 开发 (Embedded C Development):寄存器配置值 (register configuration values) 的十进制↔十六进制 (decimal ↔ hex) 转换 —— 如设置 GPIO 端口方向寄存器 (GPIO port direction register DDR) 的值或定时器/计数器 (timer/counter) 的重装载值 (reload value)。
- 网络协议分析 (Network Protocol Analysis):Wireshark 抓包 (packet capture / .pcap/.pcapng) 中看到的 IP 地址 / TCP 端口号的十六进制解读 (hexadecimal interpretation) —— 如源端口(source port)
0050= 80 (HTTP)、目的端口0050= 80。 - Web 前端开发 (Frontend Web Development):CSS 颜色 (CSS color) #RRGGBB 格式与 RGB(,,) 函数式 (function notation) 之间的转换;计算器样式 (calculator styles) 中的颜色值 (color values)。
- 逆向工程 (Reverse Engineering / RE):IDA Pro / GDB / x64dbg 等调试器 (debuggers) 中的机器码 (machine code / assembly) / 地址 (address) 的多种进制视角 (perspective switching):如查看 EIP/RIP 寄存器 (registers) 时同时在 hex / dec / bin 视图之间自由切换。
- 区块链 / 加密货币 (Blockchain / Cryptocurrency):私钥 (private key) / 哈希值 (hash value) / 交易签名 (transaction signatures) 的十六进制 (hex string) 与大整数 (big integer / BigInt) 之间的转换;以太坊 Ethereum 地址 (Ethereum address) 的 0x 前缀格式。
- 学生作业辅助 (Student Assignment Helper):计算机组成原理 (Computer Organization & Architecture) 课程中的进制转换习题 (base conversion exercises) 快速验算答案 (verify answers) —— 如 "将 255 转换为 2/8/16 进制的结果分别是什么?"
常见问题
Q: 为什么 36 是最大进制?(Why is 36 the maximum base?)
A: 用 0-9 十个数字 (10 digits) 加上 A-Z 二十六个字母 (26 letters) 共 36 个符号 (total symbols = 36 characters) 可作为数码 (digits/symbols)。超过 36 需要引入小写字母 (lowercase a-z) 或其他特殊字符 (special chars like + - _ @ # $ % ^ & * 等) 扩展字符集。当前版本工具使用标准 0-9A-Z 字符集覆盖绝大多数场景。
Q: 小数部分 (Fractional Part / Decimal Fractions) 能转换吗?
A: ❌ 当前版本 v1.0 专注整数转换器 (integer-only converter) 不处理小数部分 (fractional/decimal part)。原因 (reasoning):小数转换涉及浮点运算精度问题 (floating-point arithmetic precision issues) —— 例如
0.1 在二进制下是循环小数 (recurring/repeating infinite binary fraction) 0.000110011001101101... 无限循环无法精确表示!情况较复杂 (complex scenario)。未来版本可考虑加入有限精度 (finite precision) 支持。Q: 负数在十六进制中怎么表示?(How are negative numbers represented in hex?)
A: 通常使用 补码 (Two's Complement / 2's complement) 形式。例如: - -1 在 32 位 (32-bit) 下表示为
0xFFFFFFFFF (全 1 的 32 个 F) - -128 在 32 位下溢出需更高位宽 (overflow) - 工具提供 "补码切换开关 (2's complement toggle)" 供你选择查看这种表示形式Q: 二进制前面的
0b、十六进制的 0x 前缀算吗?(Do prefixes like 0b or 0x count as part of the number?)A: ⚠️ 输入时 (During input phase) 工具会自动识别 (auto-detect and strip) 这些编程语言前缀 (programming language prefixes) 前缀: - 移除 (strip):
0b10101010 → 10101010 (只保留纯数字部分 pure numeric part) - 移除 (strip): 0xFF → FF (只保留纯 hex 部分) - ✅ 输出时 (Output phase) 可选是否重新添加前缀 (re-add prefix for readability) 方便粘贴到代码中使用建议反馈 (可留下联系方式)
0/200
工具名称
整数进制转换器
所属分类
转换器
更新时间
2026-06-23
使用次数
43
工具简介
在不同进制间转换整数。
功能特性
四大主流进制 (Four Mainstream Bases) 并排展示:
自定义任意进制 (Custom Arbitrary Base):支持 2 到 36 范围内的任意基数 (radix/base) —— 使用
0-9 + A-Z 共 36 个字符集 (character set) 作为数码符号系统 (digit symbol system)
补码支持 (Two's Complement Support):可切换显示有符号整数 (signed integers) 的二进制补码 (Two's complement / 2's complement representation) 形式,便于理解计算机中负数的存储方式。
位宽选择 (Bit-Width Selection):8-bit / 16-bit / 32-bit / 64-bit / 128-bit 位宽 (word size / register width) 设定,对齐寄存器 (align with CPU register sizes)。
实时同步 (Reactive Synchronization):修改任一进制输入框 (any one base input field) 后其余三个进制结果区域 (other three base result areas) 自动即时重新计算并更新显示 (auto-recalculate and refresh display),无需手动点击触发按钮。
字节序展示 (Byte-Order Display):可选显示大端模式 (Big-Endian / BE: 高位在前 high-byte-first) 和小端模式 (Little-Endian / LE: 低字节在前 low-byte-first) 的内存字节排列顺序 (memory byte arrangement visualization)。
暂无收藏工具
收藏工具