Format Code Now
/

NOR Calculator

CU-29

Enter two or more numbers, one per line, and get their bitwise NOR. A result bit is 1 only where every input has a 0, so NOR is OR followed by NOT.

Runs in your browser. Nothing is uploaded.

Numbers, one per line (decimal, 0x hex or 0b binary)

NOR result

How to use it

  1. Type or paste the numbers, one per line, as decimal, 0x hex or 0b binary.
  2. Choose a bit width, or leave it on the widest input.
  3. Press Calculate NOR.
  4. Read the result in binary, decimal and hex.

What NOR means for bits

NOR is the opposite of OR. First every bit position is ORed across the numbers, then the answer is flipped. The result bit is 1 only when all the inputs have a 0 there. NOR is a universal gate: any other logic gate can be built from NOR gates alone, which is why it shows up in digital logic exercises and in simple hardware such as the guidance computers of early spacecraft.

Why the bit width matters

Flipping bits needs a fixed number of bits, because a number has endless leading zeros that would all become ones. The calculator therefore works inside a width. Widest input uses the longest number you entered, counted in typed digits for binary and hex. Pick 8, 16, 32 or 64 to match a register or a data type. A number that needs more bits than the chosen width is reported as an error and is never trimmed.

Error messages and what to do

MessageWhat it meansFix
Number 1 ("300") needs 9 bits, which is more than the chosen width of 8 bits.The first number needs more bits than the width you selected, so the result would be cut off.Choose a wider bit width, or Widest input.
Number 1 ("0b102") is not valid binary. Expected binary digits (0 and 1).A number contains a digit that is not valid for its type, here a 2 in a binary number.Use only 0 and 1 in binary numbers.

Questions people ask

What is the NOR of 12 and 10?

In 4 bits, 12 is 1100 and 10 is 1010. Their OR is 1110, and flipping it gives 0001, which is 1. In a wider width the same inputs give a larger number, because the leading zeros also flip to ones.

How do I calculate NOR of binary numbers?

Set Number type to Binary, put one number per line, choose a width and press Calculate NOR. The tool ORs the numbers together, inverts every bit inside the width and prints the result in binary, decimal and hex.

What is the truth table of a NOR gate?

A two-input NOR gives 1 only when both inputs are 0. For inputs 0 and 0 the output is 1, and for 0 and 1, 1 and 0, and 1 and 1 the output is 0. You can check it by entering 0 and 1 in 1-bit width.

Why does my NOR result change when I change the width?

NOR inverts bits, and the number of bits it inverts is the width. A wider width has more leading zeros, and each of them becomes a 1 in the result. Choose the width that matches the register or type you work with.

Can I NOR more than two numbers?

Yes. Enter as many numbers as you like, on separate lines or separated by spaces or commas. The result bit is 1 only where all of them have a 0, which is the same as ORing them all and inverting once.

About this tool

NOR is OR followed by NOT: a result bit is 1 only where that bit is 0 in every number. NOT needs a fixed width, so the result is computed inside the bit width you choose; with Widest input the width is the widest number (a binary or hex number counts its typed digits, a decimal number its bit length). A number that does not fit a chosen width is an error and is never cut off. The inputs and the result are shown in that width as binary, decimal and hex. Only non-negative whole numbers are accepted, with no sign and no fractions, and underscores inside a number are ignored. Numbers can be separated by new lines, spaces or commas. In Auto mode a plain number is decimal, so binary digits need a 0b prefix or the Binary setting. The arithmetic uses BigInt, so large values are exact. At least two numbers are needed.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.