How to use the Bitwise NOR Calculator tool
- Put the first binary word in Input A. The sample value is 1100.
- Put the second binary word in Input B. The sample value is 1010.
- Select Calculate. The page computes NOR over the width of the longer word.
- Read the answer under Result. The sample inputs give 0001.
- Select Copy to reuse the bits elsewhere, or Clear to reset the form.
How the bitwise NOR operation works
NOR means NOT OR. In each column the tool ORs the two bits, then inverts the answer. A 1 in either input forces the output to 0. Only a column with two zeros yields 1, so NOR marks the positions that neither input uses.
De Morgan's law gives an equivalent form: A NOR B equals (NOT A) AND (NOT B). If you already have the inverted values, a plain AND produces the same bits.
NOR example with two 8-bit flag bytes
Say one byte, 10010000, records the slots taken by one process and another byte, 00000110, records the slots taken by a second. NOR returns the slots that are free in both.
10010000 (Input A)
NOR 00000110 (Input B)
OR 10010110
NOR 01101001Width, padding and leading zeros
NOR is sensitive to word size because every column where both inputs are 0 becomes 1. The calculator sets the width to the length of the longer input and left-pads the other with zeros. Those padded positions count as real zero bits.
Compare 1 NOR 0, which is 0, with 01 NOR 00, which is 10. The extra leading zero adds a column of two zeros, and that column inverts to 1. With unequal lengths, 101 NOR 11000 is evaluated as 00101 NOR 11000 and returns 00010. Decide the register width you are modeling and type both operands at that width.
Fields accept 1 to 65,536 digits of 0 and 1. Spaces and a leading 0b are stripped before the calculation.
Where NOR is used
Like NAND, NOR is a universal gate: NOT, OR and AND can all be wired from NOR gates alone. The logic of the Apollo Guidance Computer was built almost entirely from three-input NOR gates. Two cross-coupled NOR gates form the SR latch, a basic one-bit memory element. NOR flash memory connects its cells in parallel, as the transistors of a NOR gate are, which allows the random access that code storage needs.
In software, NOR appears as ~(a | b). The MIPS instruction set includes a nor instruction and uses it to implement NOT, by NORing a register with the zero register.
Frequently asked questions
What is 1100 NOR 1010?
The answer is 0001. ORing the inputs gives 1110, and inverting four bits gives 0001. The rightmost column is the only one where both inputs hold 0.
How is NOR different from XNOR?
NOR outputs 1 only when both bits are 0. XNOR outputs 1 when the bits are equal, so it also returns 1 for two ones. For 1100 and 1010, NOR gives 0001 and XNOR gives 1001.
How do I write NOR in a programming language?
Most languages have no NOR operator, so combine OR and NOT: ~(a | b). On signed types the raw result is negative. AND it with a mask such as 0xFFFF to keep an unsigned 16-bit value, which is what this page does at the input width.
Why does the result have more digits than my shorter input?
The output width equals the longer input. The shorter input is extended with zeros on the left before the operation, and every result keeps its leading zeros so the columns line up.
Can NOR build a NOT gate?
Yes. Feed the same value to both inputs. A NOR A equals NOT A, so entering 1100 in both fields returns 0011. Chaining NOR gates this way also produces OR and AND.
Is the NOR calculation done on a server?
No. Both words are processed by JavaScript running in your browser tab. The page sends no request that carries your input, so register dumps and flag values stay on your machine.