🔍

首页Home › 开发工具Developer Tools

🔁 格雷码转八进制Gray Code to Octal Converter

把格雷码(二进制位串)还原并转换成八进制数,每行一个,可同时显示十进制值。Decode Gray code bit strings and convert them to octal, one per line, with optional decimal values.

使用说明与常见问题How-to & FAQ

「格雷码转八进制」是什么?What is the Gray Code to Octal Converter tool?

把格雷码(二进制位串)还原并转换成八进制数,每行一个,可同时显示十进制值。Decode Gray code bit strings and convert them to octal, one per line, with optional decimal values.

如何使用「格雷码转八进制」?How do I use the Gray Code to Octal Converter tool?

在「格雷码转八进制」中,把内容粘贴或输入到上方输入框,结果会实时显示在下方,点击「复制结果」即可复制。In the Gray Code to Octal Converter: Paste or type into the input box; the result appears below instantly — click "Copy result" to copy it.

格雷码怎么算?How is Gray code computed?

把数值 n 转成格雷码:G = n XOR (n >> 1),即最高位不变,其余每位是二进制中该位与左边一位的异或。格雷码还原:从最高位开始逐位累积异或。相邻两个数的格雷码只有一位不同。To get the Gray code of a value n: G = n XOR (n >> 1) — the top bit stays and each other bit is the XOR of that binary bit and the one to its left. To decode, XOR the bits cumulatively from the top. Neighbouring values differ in exactly one bit.

能处理多长的数?How long can the numbers be?

每行一个数,用 BigInt 精确计算,长度不受 2^53 限制。空格和下划线被当作分组符号忽略,输入可加 0b 前缀;0x、0o 不接受。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 0b; 0x and 0o are not accepted.

代码或数据会被上传吗?Is my code or data uploaded?

不会。「格雷码转八进制」完全用 JavaScript 在本地运行,适合处理含有密钥、内部接口等敏感内容的数据。No. The Gray Code to Octal Converter runs entirely in local JavaScript, so it is safe for data containing keys or internal endpoints.

「格雷码转八进制」免费吗?需要注册吗?Is the Gray Code to Octal Converter free? Do I need an account?

「格雷码转八进制」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Gray Code to Octal 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.

相关工具Related tools

🔢 十六进制转 BCD 码Hexadecimal to BCD Converter🔁 十六进制转格雷码Hexadecimal to Gray Code Converter🔢 八进制转 BCD 码Octal to BCD Converter🔁 八进制转格雷码Octal to Gray Code Converter➕ CSV 末尾追加列Append Columns to CSV⬅️ CSV 开头插入列Prepend Columns to CSV↔️ CSV 插入列(指定位置)Insert Columns into CSV🔁 CSV 列替换(整列改值 / 列内查找替换)Replace CSV Column Values✅ CSV 格式校验器CSV Validator📑 文本转 CSVText to CSV Converter📄 TSV 转对齐文本表格TSV to Aligned Text Table❓ FAQ 生成器(FAQPage 结构化数据 / HTML)FAQ Generator (FAQPage Schema & HTML)

← 全部工具All tools