NOR Calculator - Bitwise and Logic Gate
This NOR calculator works in two modes. In Bitwise mode, enter two integers in binary, octal, decimal, or hexadecimal and get the NOR result in all four bases with an 8-bit or 16-bit breakdown. In Logic gate mode, pick 2, 3, or 4 boolean inputs to see the NOR output and the complete truth table. Both modes show every step of the calculation.
What is the NOR operation?
NOR stands for NOT-OR: it combines the OR operation with a NOT (inversion). For two boolean inputs A and B, the OR step outputs 1 if either A or B (or both) is 1, and the NOT step then flips that result. So the NOR output is 1 only when both A and B are 0; it is 0 in every other case. Written in Boolean algebra the expression is Y = A + B with a bar above (the bar means invert), which is read as "not A or B." De Morgan's theorem tells us this equals (NOT A) AND (NOT B), a fact that is useful when simplifying logic circuits.
Bitwise NOR on integers
When applied to integers rather than single bits, NOR works column by column across the binary representation of each number. For each bit position the rule is the same: if both the A-bit and the B-bit are 0, the output bit is 1; if either is 1, the output bit is 0. For example, with 8-bit operands: 00111100 NOR 00001010 = 11000011 (decimal 60 NOR 10 = 195). The calculator above lets you enter values in decimal, binary, octal, or hexadecimal and shows the result in all four bases. Selecting 8-bit or 16-bit mode sets the word width used for the inversion step, which determines which higher bits appear in the result.
NOR as a universal gate
NOR is called a universal gate because any logic function, including AND, OR, and NOT, can be constructed using only NOR gates. To build a NOT gate, connect both inputs of a NOR gate to the same signal: NOR(A, A) = NOT A. To build an OR gate, put a NOR gate followed by a NOT-from-NOR stage. To build an AND gate, apply De Morgan's theorem and feed inverted inputs into a NOR gate. This universality is exploited in hardware design: an entire processor can be built from a single gate type, which simplifies manufacturing. The NAND gate shares this universality and the two are the most common primitive gates in silicon CMOS logic.
Three-input and four-input NOR gates
A NOR gate is not limited to two inputs. For three inputs A, B, and C, the output is 1 only when A = 0, B = 0, and C = 0. In general, an n-input NOR produces a HIGH output for exactly one of its 2^n input combinations (all-zeros), and a LOW for all others. Use the Logic gate mode above and set the number of inputs to 3 or 4 to see the full truth table and step-by-step evaluation for your chosen input values.
2-input NOR gate truth table
| Input A | Input B | A OR B | NOR output (NOT(A OR B)) |
|---|---|---|---|
| 0 | 0 | 0 | 1 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 |
NOR outputs HIGH (1) only when both inputs are LOW (0). This is the complete truth table for a standard 2-input NOR gate.
Frequently asked questions
What does NOR mean in logic?
NOR is short for NOT-OR. A NOR gate first computes the OR of all its inputs, then inverts (negates) the result. The output is HIGH (1) only when every input is LOW (0). For a 2-input gate this means just one of the four possible input combinations, A=0 and B=0, produces a 1 output.
How is NOR different from NAND?
NAND inverts an AND, while NOR inverts an OR. A NAND gate outputs LOW (0) only when all inputs are HIGH (1). A NOR gate outputs HIGH (1) only when all inputs are LOW (0). Both are universal gates, but their output patterns are mirror images of each other.
Why does word width matter in bitwise NOR?
Word width determines how many bits are included in the NOT step. For example, decimal 60 in 8-bit binary is 00111100. Its OR with decimal 10 (00001010) is 00111110. Inverting all 8 bits gives 11000001, which is 193. In 16-bit mode the same numbers are padded to 16 bits, so the NOT step flips 16 bits, producing a larger result: 1111111111000001 (65473). Always choose the word width that matches your target hardware.
Can I build any logic circuit with only NOR gates?
Yes. NOR is a universal gate. NOT is built by tying both NOR inputs together: NOR(A, A) = NOT A. OR is built as NOT(NOR(A, B)). AND is built as NOR(NOT A, NOT B). From these three primitives any Boolean function can be constructed, so an entire computer can in principle be made from a single gate type.
What is De Morgan's theorem for NOR?
De Morgan's theorem states that NOT(A OR B) equals (NOT A) AND (NOT B). This means a NOR gate is equivalent to an AND gate fed with inverted inputs. In hardware this equivalence is used to swap gate types while keeping the same logical behavior, which can reduce the number of gate types needed in a design.
How do I convert the NOR result from decimal to binary?
Divide the decimal result by 2 repeatedly, recording the remainder each time (0 or 1). The binary number is the sequence of remainders read from last to first. This calculator performs that conversion automatically and shows the binary, octal, and hexadecimal equivalents alongside the decimal result.