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

BitXor

Last update:
May 18, 2026

Description

Performs a bitwise logical XOR operation.

Returns

Bitwise XOR of two long integers.

Category

Function syntax

BitXor(number1, number2)

See also

Parameters

Parameter
Description
number1
32-bit signed integer
number2
32-bit signed integer

Usage

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

Example

<h3>BitXOr Example</h3> 
 <p>Returns the bitwise XOR of two long integers.</p> 
 
 <p>BitXOr(5,255): <cfoutput>#BitXOr(5,255)#</cfoutput></p> 
 <p>BitXOr(5,0): <cfoutput>#BitXOr(5,0)#</cfoutput></p> 
 <p>BitXOr(128,128): <cfoutput>#BitXOr(128,128)#</cfoutput></p>

Example

<cfscript>
  number1 = 5;
  number2 = 255;
  writeOutput(bitxor(number1, number2)); // Returns 250
</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