NOR Calculator
Calculate the bitwise NOR (NOT OR) of two numbers.
Result: A NOR B
Enter both values to see the result in decimal, hex, binary, and octal.
NOR truth table
| A | B | A NOR B |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
NOR Calculator – Bitwise NOT OR
Compute the bitwise NOR of two numbers. NOR is OR followed by NOT: a result bit is 1 only when both input bits are 0. Enter the operands in decimal, hex, binary, or octal and choose the bit width; the calculator shows the aligned bits and the result as unsigned decimal, signed decimal, hex, binary, and octal. With 8 bits, 12 NOR 10 = 241 (1111 0001).
The NOR truth table
| A | B | A NOR B |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
In other words, NOR answers the question "is neither bit set?". In code it is written ~(a | b), usually followed by a mask such as & 0xFF to keep the result inside the desired width.
Why the bit width changes the answer
Every bit that is 0 in both operands becomes 1 after NOR – including all the leading zeros. So the unsigned result grows with the width: 12 NOR 10 is 241 in 8 bits, 65,521 in 16 bits, and 4,294,967,281 in 32 bits. The signed value (−15) is the same for all widths. Auto uses the smallest multiple of 8 bits that holds both inputs.
NOR in digital logic
Like NAND, NOR is a universal gate – any logic circuit can be built from NOR gates only:
- NOT A = A NOR A
- A OR B = (A NOR B) NOR (A NOR B)
- A AND B = (A NOR A) NOR (B NOR B)
The Apollo Guidance Computer was built almost entirely from three-input NOR gates, and NOR-based SR latches are a classic building block of memory cells. NOR flash memory, used for firmware storage, is named after the same structure.
Practical uses
Find bit positions that are clear in two masks at once, verify homework for logic design courses, or double-check hardware description code. Related tools: OR Calculator, NAND Calculator, XNOR Calculator, and the Bitwise Calculator.
Frequently Asked Questions
What does NOR mean?
NOR means 'not OR' – the output is 1 only when neither input is 1. It is the inverse of the OR operation.
How do I calculate NOR in JavaScript or Python?
Use ~(a | b) and mask the result to the bit width you need, e.g. ~(a | b) & 0xFF for 8 bits. Without the mask the result is a negative number.
Is NOR a universal gate?
Yes. NOT, AND, OR, and every other Boolean function can be built from NOR gates alone, just like with NAND.