二进制转换器
将二进制转换为文本、十进制和十六进制——或将文本编码为二进制——实时输出结果。
Binary is the native language of computers, but reading long strings of ones and zeros requires training and practice. Whether you're studying computer architecture, debugging bit flags in an embedded system, following along with a networking textbook, or working through a bitwise operation by hand, having an instant converter that maps between binary and its human-readable equivalents is invaluable.
This tool converts a binary string to text (via ASCII/UTF-8), to decimal, and to hexadecimal simultaneously. Enter any sequence of 0s and 1s and see all representations update in real time. Useful for verifying bitmasks, understanding character encoding at the bit level, and checking the output of bitwise operations in code.
如何在线转换二进制
- 1
输入二进制或文本
输入二进制字符串(0 和 1)或粘贴纯文本。字节组之间的空格可以接受。
- 2
查看所有输出
UTF-8 文本、十进制和十六进制输出实时更新。无效字符(0 和 1 以外的任何字符)在行内高亮显示。
- 3
复制结果
复制您需要的任意表示形式。所有计算均在浏览器本地运行。
How Binary Representation Works
Binary is base 2 — each digit (bit) is either 0 or 1. A sequence of 8 bits forms a byte, which can represent 256 distinct values (0–255). The decimal value of a binary number is computed as a sum of powers of 2: the rightmost bit is 2^0, the next is 2^1, and so on. `10110011` in binary equals 128 + 32 + 16 + 2 + 1 = 179 in decimal and `0xB3` in hex.
Converting binary to text groups the bits into 8-bit bytes and maps each byte to the corresponding ASCII or UTF-8 character. For multi-byte UTF-8 characters, the bit pattern follows a specific structure: the leading byte begins with as many 1-bits as there are bytes in the sequence, followed by a 0-bit, while continuation bytes start with `10`. This structured bit pattern allows a parser to unambiguously identify character boundaries.
为什么使用 FileCrank 二进制转换器?
- ✓ 同时将二进制转换为文本、十进制和十六进制。
- ✓ 接受字节组之间带有空格的二进制字符串。
- ✓ 在行内高亮显示无效字符(非 0/1),并显示错误。
- ✓ 完全在浏览器中运行——不向任何服务器发送数据。
功能与规格
常见问题
二进制如何表示文本?
每个字符都有一个数字码位。二进制转换器将这些码位的二进制表示显示为 8 位组(字节)。字母 A 的码位为 65,在 8 位二进制中为 01000001。
我的二进制字符串组之间有空格——可以正常处理吗?
可以。工具接受字节组之间带有空格的二进制字符串(如 01000001 01000010)。处理前空格会被去除。字节组预期为 8 位(一个字节)。
为什么某些二进制输入的文本输出显示替换字符?
二进制字节可能无法形成有效的 UTF-8 序列。UTF-8 将某些字符编码为具有特定位模式的多字节序列。随机或非 UTF-8 的二进制数据会产生无效序列,显示为替换字符。
我可以在这里将十进制或十六进制转换为二进制吗?
不能——请在进制转换器中输入十进制或十六进制值来完成此操作。此工具专门转换二进制字符串。
Browser Converter vs. Python bin() vs. Programmer Calculator
Python's `bin()` function converts integers to binary strings but does not handle text or show multiple bases simultaneously. A programmer calculator covers binary but is typically limited to fixed-width integers (8, 16, 32, 64 bits). A browser-based converter works on arbitrary-length bit strings, shows all useful representations at once, and requires no local tools — making it the fastest option for quick educational lookups and debugging checks.
相关工具
FileCrank 二进制转换器将二进制字符串转换为 UTF-8 文本、十进制和十六进制,实时输出并在行内高亮显示错误,完全在浏览器中运行。
Advertisement