NOR Calculator
Test cases replayed : 4 of 4 match · Methodology · No outside source listed
Enter two whole numbers and a word size. With 0 and 1 as inputs, the last bit is the NOR logic gate.
Result
a NOR b = NOT (a OR b)
a OR b
- a XNOR b = NOT (a XOR b)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- First number (whole, below 2 to the power of the bit width): enter 0 or more.
- Second number (whole, below 2 to the power of the bit width): enter 0 or more.
- Bit width: choose 8 bits, 16 bits or 32 bits.
- Read the result: a NOR b = NOT (a OR b); the panel also shows a OR b and a XNOR b = NOT (a XOR b).
How this calculator works
NOR is the negation of OR: a bit of a NOR b is 1 only when both input bits are 0. For one-bit inputs: 0 NOR 0 = 1, and every other combination gives 0.
On a w-bit word, NOT flips every bit, so a NOR b = (2ʷ − 1) − (a OR b). OR is computed bit by bit: bit k of a is ⌊a ÷ 2ᵏ⌋ mod 2. Bits above the chosen width are ignored.
NOR is functionally complete: NOT, OR and AND can all be built from NOR gates alone.
Worked example
| First number (whole, below 2 to the power of the bit width) | 12 |
|---|---|
| Second number (whole, below 2 to the power of the bit width) | 10 |
| Bit width | 8 bits |
| a OR b | 14 |
|---|---|
| a NOR b = NOT (a OR b) | 241 |
| a XNOR b = NOT (a XOR b) | 249 |
Frequently asked questions
What is 12 NOR 10 on 8 bits?
12 = 00001100 and 10 = 00001010, so OR = 00001110 (14) and NOR = 11110001 = 241.
Why does the answer change with the bit width?
NOT turns every leading 0 into a 1, so more bits give a larger number: 12 NOR 10 is 241 on 8 bits and 65,521 on 16 bits.