Skip to content
FiftyCalc Free calculators for all 50 states

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

Sample figures

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.

NOR Calculator

First number (whole, below 2 to the power of the bit width): enter 0 or more. Prefilled example: 12.

Second number (whole, below 2 to the power of the bit width): enter 0 or more. Prefilled example: 10.

Bit width

Bit width: choose 8 bits, 16 bits or 32 bits. Prefilled example: 8 bits.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. First number (whole, below 2 to the power of the bit width): enter 0 or more.
  2. Second number (whole, below 2 to the power of the bit width): enter 0 or more.
  3. Bit width: choose 8 bits, 16 bits or 32 bits.
  4. 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 width8 bits
a OR b14
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.

Related calculators