Last updated on
Apr 27, 2021 05:39:21 AM GMT
|
Also Applies to ColdFusion
Description
Performs a bitwise logical AND operation.
Returns
The bitwise AND of two long integers.
Category
Function syntax
BitAnd(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>BitAnd Example</h3> <p>Returns the bitwise AND of two long integers.</p> <p>BitAnd(5,255): <cfoutput>#BitAnd(5,255)#</cfoutput></p> <p>BitAnd(5,0): <cfoutput>#BitAnd(5,0)#</cfoutput></p> <p>BitAnd(128,128): <cfoutput>#BitAnd(128,128)#</cfoutput></p> |
Example
<cfscript> number= 5; number1 = 255; writeOutput(bitand(5,255)); // Returns 5 </cfscript>
Sign in to your account