🔢 十六进制转 BCD 码Hexadecimal to BCD Converter
把十六进制数转换成 8421 BCD 码:先换算成十进制,再把每位十进制数字写成 4 位二进制,每行一个,可同时显示十进制值。Convert hexadecimal to 8421 BCD: the value is turned into decimal and each decimal digit is written as 4 bits, one number per line, with optional decimal values.
使用说明与常见问题How-to & FAQ
「十六进制转 BCD 码」是什么?What is the Hexadecimal to BCD Converter tool?
把十六进制数转换成 8421 BCD 码:先换算成十进制,再把每位十进制数字写成 4 位二进制,每行一个,可同时显示十进制值。Convert hexadecimal to 8421 BCD: the value is turned into decimal and each decimal digit is written as 4 bits, one number per line, with optional decimal values.
如何使用「十六进制转 BCD 码」?How do I use the Hexadecimal to BCD Converter tool?
在「十六进制转 BCD 码」中,把内容粘贴或输入到上方输入框,结果会实时显示在下方,点击「复制结果」即可复制。例如输入「FF」,得到「0010 0101 0101」。In the Hexadecimal to BCD Converter: Paste or type into the input box; the result appears below instantly — click "Copy result" to copy it. Example: "FF" → "0010 0101 0101".
BCD 码是什么?What is BCD?
BCD(8421 码)把每一位十进制数字分别用 4 位二进制表示:255 → 0010 0101 0101。每组只能是 0000–1001(0–9),1010–1111 无效。BCD (8421) writes each decimal digit as 4 bits: 255 → 0010 0101 0101. Each group must be 0000–1001 (0–9); 1010–1111 is invalid.
能处理多长的数?How long can the numbers be?
每行一个数,用 BigInt 精确计算,长度不受 2^53 限制。空格和下划线被当作分组符号忽略,输入可加 0x 前缀;0o、0b 不是十六进制前缀(0b1011 中的 b 会被当作十六进制数字 B,读成 0xB1011)。One number per line, computed exactly with BigInt, so there is no 2^53 limit. Spaces and underscores are ignored as grouping, and the input may start with 0x; 0o and 0b are not hexadecimal prefixes (in 0b1011 the b is read as the hex digit B, giving 0xB1011).
代码或数据会被上传吗?Is my code or data uploaded?
不会。「十六进制转 BCD 码」完全用 JavaScript 在本地运行,适合处理含有密钥、内部接口等敏感内容的数据。No. The Hexadecimal to BCD Converter runs entirely in local JavaScript, so it is safe for data containing keys or internal endpoints.
「十六进制转 BCD 码」免费吗?需要注册吗?Is the Hexadecimal to BCD Converter free? Do I need an account?
「十六进制转 BCD 码」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Hexadecimal to BCD Converter is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.