"Sputnik" help  
Sputnik Help
BitAnd(<value>, ...)

Description

Performs a bitwise AND operation on the given values and returns the result.

Parameters

<value> The values to perform the bitwise AND operation on.

Return Value

Success: Returns the result of the bitwise AND operation.
Failure: Returns same as success.

Remarks

The BitAnd function takes multiple values as input and performs a bitwise AND operation on them. It calculates the logical AND of the corresponding bits of each value and returns the resulting value.

The function starts with the first value and performs the bitwise AND operation with each subsequent value. The final result is returned as the output.

The BitAnd function is commonly used to manipulate or extract specific bits in binary values.

Related

Example

Example of usage:

my $x = BitAnd(13, 7);
println($x); // x == 5 because 1101 AND 0111 = 0101
my $x = BitAnd(2, 3, 6);
println($x); // x == 2 because 0010 AND 0011 AND 0110 = 0010
 
// Or maybe
my $x = 13 & 7;
println($x); // x == 5 because 1101 AND 0111 = 0101
my $x = 2 & 3 & 6;
println($x); // x == 2 because 0010 AND 0011 AND 0110 = 0010

 


Contact
Cheryl (uberfox@hotmail.com)
Homepage
http://ubersoft.org