Oracle BITAND(X, X-1) Analysis
Using BITAND(1,1) = 1 and BITAND other three combinations being 0 we can obtain 
the function output as follows.

For BITAND(1,0) the binary value of AND(01, 00) is 00 which is decimal 0.
For BITAND(2,1) the binary value of AND(10, 01) is 00 which is decimal 0.
For BITAND(3,2) the binary value of AND(11, 10) is 10 which is decimal 2.
For BITAND(4,3) the binary value of AND(100, 011) is 000 which is decimal 0.

Following the same logic, result for BITAND(5,4) and further is as shown in the 
table below.

Oracle BITAND(X, X) Analysis

Refer: Logic Gates (AND truth table)

BITAND Function


Last Revised On: July 31, 2014