⊼ 十六进制 NAND 运算(与非)NAND Hex Numbers
把两个或多个十六进制数按位做 NAND(与非):先 AND 再取反。位数不同时左边补 0。适合学习逻辑门和位运算,数据在本地处理。Bitwise NAND on two or more hex values (AND then invert). Shorter values are left-padded. Handy for logic gates and bitwise practice. Processed locally.
使用说明与常见问题How-to & FAQ
「十六进制 NAND 运算(与非)」是什么?What is the NAND Hex Numbers tool?
把两个或多个十六进制数按位做 NAND(与非):先 AND 再取反。位数不同时左边补 0。适合学习逻辑门和位运算,数据在本地处理。Bitwise NAND on two or more hex values (AND then invert). Shorter values are left-padded. Handy for logic gates and bitwise practice. Processed locally.
如何使用「十六进制 NAND 运算(与非)」?How do I use the NAND Hex Numbers tool?
在「十六进制 NAND 运算(与非)」中,把内容粘贴或输入到上方输入框,按需设置「计算方式」、「最少位数(可选)」,结果会实时显示在下方,点击「复制结果」即可复制。Type or paste two or more hex values. "Combine" decides whether all values are combined together or each line separately (Auto picks for you), and "Minimum width (optional)" pads the result with leading zeros. The NAND result updates as you type; click "Copy result" to copy it.
怎样输入多个数?How do I enter several values?
每行一个,或用空格、逗号、分号分隔;可加 0x 前缀,下划线会被忽略。One per line, or separated by spaces, commas or semicolons; a 0x prefix is fine and underscores are ignored.
结果有多少位?How wide is the result?
与最长输入相同;填了「最少位数」且更大时按最少位数,左边补前导 0 便于对齐(例如 FF 与 FF 做 NAND 得 00)。As wide as the longest input, or the Minimum width if that is larger; leading zeros are kept so bits line up (NAND of FF and FF gives 00).
「计算方式」的“自动”怎么选?What does the Auto combine mode do?
“所有数一起计算”把输入里的全部数做一次 NAND;“每行单独计算”每行各算一次,每行至少要有两个数。“自动”看输入的样子:只要有一行写了两个或更多数,就按每行单独计算(例如 F0 0F 换行 1 2 得 FF 换行 3);如果每行只有一个数,就把所有行一起计算(例如 F0 换行 0F 得 FF)。All values together applies NAND once to every value in the input; Each line separately works line by line, and every line needs at least two values. Auto looks at the input: if any line holds two or more values it works line by line (F0 0F, then 1 2 on the next line, gives FF and 3); if every line has a single value it combines all lines (F0, then 0F, gives FF).
计算是精确的吗?Is it exact?
是。按位运算用大整数(BigInt)完成,不经过浮点,几千位的输入也能在瞬间算完。Yes. Bitwise operations use big integers (BigInt) with no floating-point, and inputs thousands of digits long finish instantly.
输入和输出是什么样的?What does the input and output look like?
例如在「十六进制 NAND 运算(与非)」中输入 F0 ⏎ 0F,输出为:FF(⏎ 表示换行)。For example, the NAND Hex Numbers turns the input F0 ⏎ 0F into: FF (⏎ marks a line break).
有哪些选项可以调整?What options can I adjust?
「十六进制 NAND 运算(与非)」的设置:「计算方式」可选 自动、所有数一起计算、每行单独计算(默认 自动);「最少位数(可选)」可留空;可勾选:「显示竖式」、「同时显示十进制」、「同时显示二进制」、「加 0x 前缀」、「每 4 位加空格」。改动任一选项后结果会按新设置重新生成。Settings in the NAND Hex Numbers — "Combine": Auto, All values together, Each line separately (default Auto); "Minimum width (optional)" optional; tick boxes: "Show the working", "Also show decimal", "Also show binary", "Add 0x prefix", "Space every 4 digits". Changing any option regenerates the result with the new setting.
代码或数据会被上传吗?Is my code or data uploaded?
不会。「十六进制 NAND 运算(与非)」完全用 JavaScript 在本地运行,适合处理含有密钥、内部接口等敏感内容的数据。No. The NAND Hex Numbers runs entirely in local JavaScript, so it is safe for data containing keys or internal endpoints.
「十六进制 NAND 运算(与非)」免费吗?需要注册吗?Is the NAND Hex Numbers free? Do I need an account?
「十六进制 NAND 运算(与非)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The NAND Hex Numbers is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.