bitAnd#
Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0
Available in: math cells, REPL.
Syntax#
x & y
bitAnd(x, y)
Arguments and behavior#
Arguments must match one of the syntax forms above. Use the example as a starting point; arrays and numeric types are accepted only by compatible overloads. The example returns scalar (number).
Example#
Edit the inputs, then use Run or Reset. Changes stay in this example.
Example
bitAnd(6,3)Interactive examples could not load. You can still copy the expressions.
Expected result: 2.
See also#
bitNot · bitOr · bitXor · leftShift · rightArithShift · rightLogShift