⊽ 二进制 NOR 运算(或非)NOR Binary Values
把两个或多个二进制数按位做 NOR(或非)运算:先按位 OR,再全部取反,只有所有数在该位都是 0 时结果才是 1。可以每行一组分别计算或所有数一起计算,位数不同时右端对齐左边补 0,可设置最少位数、显示竖式和十进制结果。适合学习逻辑门(NOR 是通用门)、数字电路和位运算练习,数据在本地处理。Apply bitwise NOR to two or more binary values: OR them and invert the result, so a bit is 1 only where every value has a 0. Work each line separately or combine all values; different lengths are right-aligned with leading zeros. Set a minimum width, show the working and see the result in decimal. Handy for learning logic gates (NOR is a universal gate), digital electronics and bitwise exercises. Processed locally.
使用说明与常见问题How-to & FAQ
「二进制 NOR 运算(或非)」是什么?What is the NOR Binary Values tool?
把两个或多个二进制数按位做 NOR(或非)运算:先按位 OR,再全部取反,只有所有数在该位都是 0 时结果才是 1。可以每行一组分别计算或所有数一起计算,位数不同时右端对齐左边补 0,可设置最少位数、显示竖式和十进制结果。适合学习逻辑门(NOR 是通用门)、数字电路和位运算练习,数据在本地处理。Apply bitwise NOR to two or more binary values: OR them and invert the result, so a bit is 1 only where every value has a 0. Work each line separately or combine all values; different lengths are right-aligned with leading zeros. Set a minimum width, show the working and see the result in decimal. Handy for learning logic gates (NOR is a universal gate), digital electronics and bitwise exercises. Processed locally.
如何使用「二进制 NOR 运算(或非)」?How do I use the NOR Binary Values tool?
在「二进制 NOR 运算(或非)」中,把内容粘贴或输入到上方输入框,按需设置「计算方式」、「位数不同时」、「最少位数(可选)」,结果会实时显示在下方,点击「复制结果」即可复制。In the NOR Binary Values: Paste or type into the input box, adjust "Combine", "Different lengths", "Minimum width (optional)"; the result appears below instantly — click "Copy result" to copy it.
怎样输入多个数?How do I enter several values?
每行一个数,或在同一行里用空格、逗号、分号或加号(+)分隔;可以带 0b 前缀,数中间的下划线会被忽略(如 1010_1100)。“自动”方式下:如果有一行包含两个以上的数,就每行单独计算;否则所有数一起计算。Put one value per line, or separate them with spaces, commas, semicolons or plus signs (+) on a line. A 0b prefix is fine and underscores inside a value are ignored (1010_1100). In Auto mode, if any line holds two or more values each line is worked out on its own; otherwise all values are combined.
位数不同的数怎么对齐?How are values of different lengths lined up?
按右端(最低位)对齐,短的数在左边补 0,例如 101 和 11 按 101 和 011 计算,结果的位数等于最长的数(或你设置的“最少位数”)。如果希望位数不同时报错,把“位数不同时”改为“报错”。They are right-aligned on the lowest bit and shorter values get leading zeros, so 101 and 11 are treated as 101 and 011; the result is as long as the longest value (or the Minimum width you set). Choose "Show an error" under Different lengths if mismatched lengths should be rejected.
NOR 的真值表是什么?What is the NOR truth table?
0 NOR 0 = 1,0 NOR 1 = 0,1 NOR 0 = 0,1 NOR 1 = 0,也就是 OR 的结果取反。多个数做 NOR 时,只有所有数在该位都是 0,结果才是 1。只用 NOR 门就能搭出所有其他逻辑门。0 NOR 0 = 1, 0 NOR 1 = 0, 1 NOR 0 = 0, 1 NOR 1 = 0 — the inverse of OR. With several values a bit is 1 only where all of them are 0. Every other logic gate can be built from NOR gates alone.
结果的位数是多少?How many bits does the result have?
结果保留和最长的输入(或“最少位数”)一样多的位,包括前导 0,例如 1100 NAND 1010 = 0111,而不是 111;这样每一位都能和输入对应上。The result keeps as many bits as the longest input (or the Minimum width), leading zeros included, so every bit lines up with the inputs.
代码或数据会被上传吗?Is my code or data uploaded?
不会。「二进制 NOR 运算(或非)」完全用 JavaScript 在本地运行,适合处理含有密钥、内部接口等敏感内容的数据。No. The NOR Binary Values runs entirely in local JavaScript, so it is safe for data containing keys or internal endpoints.
「二进制 NOR 运算(或非)」免费吗?需要注册吗?Is the NOR Binary Values free? Do I need an account?
「二进制 NOR 运算(或非)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The NOR Binary Values is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.