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

BitOr

Last update:
May 18, 2026

Description

Performs a bitwise logical OR operation.

Returns

A number; the bitwise OR of two long integers.

Category

Function syntax

BitOr(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>BitOr Example</h3> 
 <p>Returns the bitwise OR of two long integers.</p> 
 
 <p>BitOr(5,255): <cfoutput>#BitOr(5,255)#</cfoutput></p> 
 <p>BitOr(5,0): <cfoutput>#BitOr(5,0)#</cfoutput></p> 
 <p>BitOr(7,8): <cfoutput>#BitOr(7,8)#</cfoutput></p>

Example

<cfscript>
  number1 = 7;
  number2 = 9;
  writeOutput(bitor(number1, number2)) ; // Returns 15
</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