BitNot

Performs a bitwise logical NOT operation.

Method Signature

BitNot(number=[integer])

Arguments

Argument
Type
Required
Description
Default

number

integer

true

Numeric value for bitwise NOT.

Examples

Calculate bitwise logical NOT

Uses the bitNot function to perform the logical NOT operation of a signed 32-bit integer (two's complement)

Run Example

bitNot( 0 );

Result: -1

Additional Examples

Run Example

writeOutput( bitNot( 0 ) );
writeOutput( "<br>" );
writeOutput( bitNot( 255 ) );

Last updated

Was this helpful?