# BITAND function in Oracle

BITAND is one of the vital Numeric/Math functions of Oracle. It is used to perform an AND operation on the bits of two expressions. The result is an integer value. The BITAND function is supported in the various versions of the Oracle/PLSQL, including, Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i and Oracle 8i.

Syntax:

bitand( expr1, expr2 )


Parameters:
expr1, expr2: It is used to specify the expressions on which the operations will be performed.

Example 1:

BITAND( 10, 11)

Output:

10


Explanation:
Here we are calculating the AND operation on the bits of 10 and 11. The hexadecimal representation of 10 is 1010 and of 11 is 1011. Thus the result of AND operation is 1010, whose integer value is 10.