Nor Calculator - Bitwise NOR, Truth Table, and Result

Use this nor calculator to apply the bitwise NOR to two numbers in binary, octal, decimal, or hex at 4, 8, 12, or 16 bits, plus the truth table.

Updated: June 16, 2026 • Free Tool

Nor Calculator

First operand in the chosen base. Binary, octal, decimal, and hex are accepted. Hex values can use the digits 0-9 and the letters A-F in either case.

Second operand in the same base as Number 1. Hex values accept the digits 0-9 and the letters A-F.

Base of the two input fields. 2, 8, 10, or 16.

Bit width for each input. The result is masked to this width.

Results

NOR Result (Decimal)
0
NOR Result (Binary) 0
NOR Result (Hex) 0

2-Input NOR Truth Table

The 2-input NOR output is 1 only when both inputs are 0, and 0 for every other combination. Any longer binary NOR is built column by column from these four rules.

A is the first bit, B is the second bit, and A NOR B is the inverted OR of the pair.

Two-input NOR gate truth table showing the input bits A and B, the output bit A NOR B, and the Boolean expression for each of the four input combinations.
A B A NOR B Boolean form
0 0 1 NOT (0 OR 0)
0 1 0 NOT (0 OR 1)
1 0 0 NOT (1 OR 0)
1 1 0 NOT (1 OR 1)

What Is a nor Calculator?

A nor calculator returns the bitwise NOR of two numbers by inverting the OR of each pair of corresponding bits. Type the operands in binary, octal, decimal, or hex, pick a bit width, and the result panel shows the NOR in the same base, padded in binary, and written in hex. Every position where both inputs are 0 becomes 1, and every other position becomes 0.

  • Universal logic-gate design: Build any Boolean function from a single gate type, since NOR (like NAND) is functionally complete on its own.
  • Hardware register clearing: Combine NOR with an inverter to clear bits in a control register, a common firmware pattern.
  • Digital-electronics homework and labs: Verify the 2-input NOR truth table and the 8-bit NOR output for any pair of binary inputs during coursework.
  • Bit-mask inversion in code: Generate a bit pattern with 1s wherever both inputs are 0, useful for setting all bits outside a chosen mask.

NOR is a standard bitwise operator in most languages, alongside AND, OR, XOR, and NOT. It operates one bit at a time, so the result depends on the binary representation of the inputs.

When you need the other half of the comparison, the and Calculator returns the bitwise AND of the same pair of numbers with the same base and bit-width controls.

How the nor Calculator Works

The calculator parses the two inputs in the chosen base, masks each to the bit width, performs a bitwise OR, inverts every bit, and formats the result. The truth table card above lists the four fixed (A, B) bit pairs that drive every column of a longer NOR.

result_bit_i = NOT (A_bit_i OR B_bit_i) (1 only when both bits are 0, 0 otherwise)
  • A_bit_i: The bit at position i in the binary representation of Number 1, counted from the right starting at 0.
  • B_bit_i: The bit at position i in the binary representation of Number 2, counted from the right starting at 0.
  • result_bit_i: The bit at position i of the NOR result. Equals 1 only when both A_bit_i and B_bit_i are 0; otherwise 0.
  • bitWidth: The chosen number of bits (4, 8, 12, or 16). Inputs and the result are masked to this width so the high bits are dropped.

Decimal 170 NOR decimal 85 (8-bit)

Number 1 = 170, Number 2 = 85, base = decimal, width = 8

170 in binary is 10101010 and 85 in binary is 01010101. OR them: 11111111. Invert every bit: 00000000.

NOR result in decimal: 0. In binary: 00000000. In hexadecimal: 0x0.

Every column has at least one 1, so every output bit is 0. The two inputs are bitwise complements, so their OR is all-ones and the NOR is all-zeros.

Hexadecimal AB NOR hexadecimal 00 (8-bit)

Number 1 = AB, Number 2 = 00, base = hex, width = 8

AB in binary is 10101011 and 00 in binary is 00000000. OR: 10101011. Invert: 01010100.

NOR result in decimal: 84. In binary: 01010100. In hexadecimal: 0x54.

NOR with 00 inverts every bit of AB inside the chosen width, so 0xAB becomes 0x54.

According to Omni Calculator, the NOR gate performs a bit operation for each pair of bits in the inputs and produces 1 only when both input bits are 0, otherwise producing 0.

According to MDN Web Docs, the bitwise NOT operator (~) inverts every bit of its operand and is the complement used to build NOR from a bitwise OR.

To convert the inputs or the result between binary, octal, decimal, and hex without doing the math by hand, the Binary Converter accepts a value in any of those bases.

Key Concepts Behind the Bitwise NOR

Four short ideas explain why the NOR behaves the way it does. Once these are clear, NOR stops looking like a magic operator and starts looking like an OR followed by a column-by-column bit flip.

NOR is the inverse of OR

The NOR gate produces 1 only where an OR would have produced 0. Because OR produces 0 only when both inputs are 0, NOR produces 1 only in that same case, and 0 for every other combination.

Truth table for a 2-input NOR

For inputs A and B, the NOR gate outputs 1 only when A = 0 and B = 0. The other three rows all output 0. The 2-Input NOR Truth Table card above shows the same four rows.

NOR in programming notation

Most languages do not have a single NOR token, so NOR is written as the complement of OR. In C, Java, JavaScript, and Python the bitwise NOR of x and y is ~(x | y) masked to the relevant width.

NOR is a universal gate

Like NAND, NOR is functionally complete on its own, so any Boolean function can be built from a network of only NOR gates, which is why NOR-only logic families exist in CMOS design.

The same rule extends to more than two inputs. A 3-input NOR returns 1 only when all three bits at that position are 0, so a single 1 anywhere in the input collapses the entire column to 0.

When the inputs are Boolean expressions with AND, OR, and NOT, the Boolean Algebra Calculator evaluates the full expression and shows the truth table for the variables.

How to Use the nor Calculator

Enter the two operands, pick the base they are written in, and pick the bit width. The result panel updates in real time.

  1. 1 Type Number 1 and Number 2: Enter the two operands in the first row using the same base. Decimal takes digits, binary takes 0 and 1, and hex takes 0-9 and the letters A-F in either case.
  2. 2 Pick the input base: Use the Input Base dropdown to select binary, octal, decimal, or hex. Both operands are read in this base and the result is shown in decimal, binary, and hex.
  3. 3 Pick the bit width: Use the Bit Width dropdown to select 4, 8, 12, or 16. Values that would overflow a smaller width have their high bits dropped, like a fixed-width register.
  4. 4 Read the NOR result: The highlighted NOR Result (Decimal) row shows the bitwise NOR as a non-negative integer. The Binary and Hex rows show the same value padded to the bit width.
  5. 5 Compare against the truth table: The 2-Input NOR Truth Table card above lists the four (A, B) bit pairs and the matching output. Any column in a longer binary NOR follows one of those four rows.

Example: a digital-electronics student needs the NOR of the byte 0xF0 and the byte 0x0F. They type F0 into Number 1 and 0F into Number 2, leave the base at Hexadecimal, the bit width at 8, and read 0x0 in hex and 0 in decimal, because every column has at least one 1.

If you want AND, OR, XOR, and NOT on the same pair of numbers in a single panel, the Binary Operations Calculator runs all of the bitwise operations side by side so the results are easy to compare.

Benefits of Using This nor Calculator

NOR is one of the simplest operators to define, but mixing bases and bit widths by hand is the easy place to lose a bit. The calculator keeps the operands, the base, and the width consistent.

  • Bit-level result without manual alignment: The result panel shows the NOR in decimal, binary, and hex at the same time, with no need to align bits on paper.
  • Works in binary, octal, decimal, and hex: Type the operands in the base your problem statement uses and the result appears in that base plus binary and hex.
  • Bit-width masking matches real hardware: Choose 4, 8, 12, or 16 bits to mimic a fixed-width register. Values that overflow the chosen width have their high bits dropped, like AND with a width-sized mask after the bitwise NOT in JavaScript or Python.
  • Truth table next to the numeric result: The 2-Input NOR Truth Table card sits beside the form, so the four (A, B) -> output rows are always one scroll away.
  • Reusable for NOR-only logic and register clearing: The same workflow works for designing NOR-only circuits, building an AND from three NOR gates, and clearing all bits outside a chosen mask.

The biggest practical win is consistency. NOR behaves the same way regardless of which base the inputs are written in, and the calculator applies that rule in one pass.

When the result is in binary and you need to read it in hex without doing the nibble grouping yourself, the Binary to Hexadecimal Calculator converts a binary string to its hexadecimal value in one step.

Factors That Affect the Result and Its Limits

The bitwise NOR is fixed, but four choices about the inputs change what the result means.

Input base

The base only changes how the inputs are parsed. The bitwise NOR operates on the underlying integer, so 0xFF in hex and 255 in decimal produce the same result.

Bit width

4, 8, 12, and 16 bits set the size of the result. NOR of 0 and 0 in 4-bit width returns 15 (0xF) because the high bits are dropped before the inversion.

Sign of the inputs

The calculator treats the inputs as non-negative integers. A negative two's-complement input is out of scope; apply the two's-complement conversion first.

Invalid characters for the chosen base

A digit that is not allowed in the chosen base (a 2 in binary or a G in hex) fails to parse and the result falls back to 0 until the input is corrected.

  • The calculator takes exactly two operands. For three or more inputs, NOR the first two and combine the intermediate result with the next input using the same pattern.
  • The inputs are read as non-negative integers, so the result is also non-negative. For signed two's-complement integers, convert to the unsigned form first, NOR, and interpret the result as signed afterward.

When the inputs and the bit width are clear, the result is fully determined and matches what the same operation would produce in JavaScript, Python, or C.

According to Wolfram MathWorld, a NOR gate is a logic gate that implements the NOR Boolean function and is one of the two universal gates alongside NAND.

When the next step is to shift the NOR result left or right to isolate a specific group of bits, the Bit Shift Calculator performs the logical and arithmetic shifts at the same bit width.

nor calculator showing the bitwise NOR of two numbers in binary, decimal, or hex with a 4/8/12/16-bit width and the 2-input NOR truth table.
nor calculator showing the bitwise NOR of two numbers in binary, decimal, or hex with a 4/8/12/16-bit width and the 2-input NOR truth table.

Frequently Asked Questions

Q: What does the nor calculator do?

A: The nor calculator returns the bitwise NOR of two numbers. It accepts operands in binary, octal, decimal, or hexadecimal, applies the bit-by-bit NOT(OR) at a chosen bit width, and shows the result in the same base plus binary and hex alongside the 2-input truth table.

Q: What is the truth table of a NOR gate?

A: For two inputs A and B, the NOR gate outputs 1 only when A = 0 and B = 0. The other three rows (01, 10, 11) all output 0. The page renders that 2-input truth table directly.

Q: How do you compute the bitwise NOR of two numbers?

A: Write both numbers in binary, align them on the right, OR each pair of bits, then flip every bit of the result. The output is 1 only in columns where both inputs were 0. The calculator does that for you.

Q: Is NOR a universal logic gate?

A: Yes. NOR is functionally complete on its own, which means AND, OR, NOT, and XOR can all be built from a network of only NOR gates. NAND is the other universal gate, and the two are used interchangeably in CMOS logic.

Q: What is the difference between NOR and OR?

A: OR produces 1 when at least one input is 1. NOR is the inverse of OR, so it produces 1 only when every input is 0, and 0 for every other combination.

Q: How do I build an AND gate from NOR gates?

A: Invert each input with one NOR gate by feeding the same signal to both inputs, then feed those two inverted outputs into a third NOR gate. The third NOR output equals the AND of the original inputs.