Whatever message this page gives is out now! Go check it out!

BitNot

Last update:
May 18, 2026

Description

Performs a bitwise logical NOT operation.

Returns

A number; the bitwise NOT of a long integer.

Category

Function syntax

BitNot(number)

See also

Parameters

Parameter
Description
number
32-bit signed integer

Usage

Bit functions operate on 32-bit signed integers, in the range -2147483648 - 2147483647.

Example

<h3>BitNot Example</h3> 
 <p>Returns the bitwise NOT of a long integer.</p> 
 
 <p>BitNot(0): <cfoutput>#BitNot(0)#</cfoutput></p> 
 <p>BitNot(255): <cfoutput>#BitNot(255)#</cfoutput></p>

Example

<cfscript>
  number = 5 ;
  writeOutput(bitnot(number)) ; //Result is -6
</cfscript>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page