Skip to content

BITAND

  • n1: This is the first binary number for the BITAND operation. It must be a non-negative integer or a value that can be implicitly converted to an integer.
  • n2: This is the second binary number for the BITAND operation. Similar to n1, it must be a non-negative integer or a value that can implicitly be converted to an integer.
SELECT BITAND(15, 10) as Result FROM dual;
RESULT
------
10

The BITAND function performs a bitwise AND operation between the binary representations of the two numbers. In this case, numbers 15 (1111 in binary) and 10 (1010 in binary) are compared. The resulting number is 10 (1010 in binary), because the AND operation results in 1 for each bit where both input bits are 1.