Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

BITAND Function in Oracle

715292Dec 17 2009 — edited Dec 17 2009
Hi All,

Is that something wrong with the bitand function if the parameter is passed more than 2^63 ? See below example.
Is below behaviour expected or there is some bug with the bitand function ?
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0      Production
TNS for Solaris: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

SQL> select bitand ( power(2,10) , power(2,0) ) Correct_Result from dual;

CORRECT_RESULT
--------------
             0

SQL> select bitand ( power(2,63) , power(2,0) ) Incorrect_Result from dual;

INCORRECT_RESULT
----------------
               1
Regards,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 14 2010
Added on Dec 17 2009
1 comment
670 views