Hex ↔ Binary

8-Byte Calculator · 八字节计算器

Up to 8 bytes (16 hex digits). Spaces optional.

1 byte · 8 bits · 点击下方二进制位可翻转 0/1

Bytes:

Binary View · 二进制视图

Click any bit to toggle · 16 bits per row · 点击位翻转

B000

B0 (MSB) bit7↑ … ↓ B0 bit0 · 每 4 bit 分组,中间竖线分隔前后 8 bit

Raw:

Free Hex ↔ Binary Converter (8 Bytes)免费十六进制 / 二进制互转工具(最多 8 字节)

This hex to binary converter lets you type up to 8 bytes of hexadecimal, see every bit laid out visually, and click any bit to flip between 0 and 1 — the hex value updates instantly. It is built for firmware engineers, embedded developers, and anyone debugging protocol fields, register masks, or memory dumps.

这款十六进制 / 二进制转换器支持最多 8 字节输入,以可视化方式展开每一位,点击即可翻转 0/1,hex 值同步更新。适用于固件开发、嵌入式调试、协议字段与寄存器掩码分析。

Hexadecimal & Binary Basics十六进制与二进制基础

Binary (base-2) uses only 0 and 1. Each position is a power of two. Hexadecimal (base-16) uses 0–9 and A–F; each hex digit compresses exactly 4 bits (one nibble). Two hex digits form one byte (8 bits).

二进制只有 0 和 1,每位代表 2 的幂。十六进制使用 0–9 与 A–F,每个 hex 数字对应 4 个二进制位(一个 nibble),两个 hex 数字组成 1 字节(8 bit)。

Example · 示例

Hex7C
Binary0111 1100
Decimal124

7 → 0111 · C → 1100 · grouped as two nibbles for readability

Byte, Nibble & Bit Numbering字节、半字节与位编号

Terms

  • Nibble — 4 bits (one hex digit)
  • Byte — 8 bits (two hex digits)
  • Word — 16 bits (this tool shows 16 bits per row)
  • B0 — LSB byte (lowest); B7 — MSB byte (highest) in 8-byte mode
  • Within a byte: bit 7 = MSB (left), bit 0 = LSB (right)

术语

  • Nibble(半字节) — 4 bit,对应 1 个 hex 数字
  • Byte(字节) — 8 bit,对应 2 个 hex 数字
  • Word(字) — 16 bit,本工具每行 显示 16 bit
  • B0 为最低字节,8 字节模式下 B7 为最高字节
  • 字节内 bit 7 为高位(左),bit 0 为低位(右)

How to Use This Tool使用说明

  1. Select 1–8 bytes with the byte-count buttons.
  2. Type hex (e.g. 7C, 00 7C, or 0x7C).
  3. Read the binary grid — 16 bits per row, grouped by nibbles.
  4. Click any bit to toggle; hex updates automatically.
  5. Use Copy to export hex.
  6. Clear resets to zero while keeping the current byte count.
  1. 用 Bytes 按钮选择 1–8 字节。
  2. 输入 hex(如 7C、00 7C、0x7C,支持空格与 0x 前缀)。
  3. 在二进制区查看,每行 16 bit,每 4 bit 分组。
  4. 点击任意位翻转 0/1,hex 自动同步。
  5. 点 Copy 复制 hex 字符串。
  6. Clear 清零但保持当前字节数不变。

Common Use Cases常见应用场景

  • Register bit masks — flip individual flags and copy the resulting hex
  • CAN / serial protocols — inspect 8-byte frames field by field
  • UUIDs & 64-bit IDs — visualize all 64 bits at once
  • Teaching & learning — see how hex maps to binary without hand calculation
  • 寄存器位掩码 — 翻转标志位并复制结果 hex
  • CAN / 串口协议 — 逐字段查看 8 字节数据帧
  • UUID / 64 位 ID — 一次查看全部 64 bit
  • 教学演示 — 直观理解 hex 与二进制的对应关系

Frequently Asked Questions

Does bit 0 mean the leftmost or rightmost bit?
In this tool, bit 0 is the LSB (rightmost within a byte). Bit 7 is the MSB (leftmost). Global bit numbers run from bit 0 (B0 LSB) to bit 63 (B7 MSB) in 8-byte mode.
bit 0 在左边还是右边?
本工具中 bit 0 为最低位(字节内靠右),bit 7 为最高位(靠左)。8 字节模式下全局编号从 bit 0 到 bit 63。
Why does Clear leave the input box empty when all bytes are zero?
All-zero bytes are shown as an empty hex field for cleaner editing, but the binary grid still displays the full byte count with every bit set to 0.

← Back to Quick Help Guide · 返回首页