nor()

Performs a bitwise NOR (NOT OR) operation on one or more integers.

Syntax

nor(value1, [value2, ...])

Parameters

Parameter Type Description
value1 Number The first integer value.
value2..N Number Additional integer values to apply NOR with. optional

Return Value

Examples

Single value, returns NOT of itself

nor(5);      // returns 4294967290 (~5)

Bitwise OR of 5 (0101) and 3 (0011) → 0111
Bitwise NOT of 0111 → 1000

nor(5, 3);   // returns 4294967288

Bitwise OR of 1 (0001), 2 (0010), and 4 (0100) → 0111
Bitwise NOT of 0111 → 1000

nor(1, 2, 4); // returns 4294967288

See also

bit
not
and
or
xor
nand
nor
xnor
shl
shr