Oracle® OLAP Expression Syntax Reference Release 11.2 E23381-01 |
|
|
PDF · Mobi · ePub |
BITAND
computes an AND
operation on the bits of two nonnegative integers, and returns an integer. This function is commonly used with the DECODE
function.
An AND
operation compares two bit values. If both values are 1, the operator returns 1. If one or both values are 0, the operator returns 0.
NUMBER
BITAND(expr1, expr2)
expr1
and expr2
are numeric expressions for nonnegative integers.
BITAND(7, 29)
returns the value 5
.
The binary value of 7
is 111
and of 29
is 11101
. A bit-by-bit comparison generates the binary value 101
, which is decimal 5
.