Bitand Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Terry Coccoli

    Bitand Question

    Can someone tell me if the following query:

    select bitand(power(2, 31),power(2,30) )+0
    from dual


    which returns 1073741824 is correct ? I'm thinking that the result
    should actually be 0.



    When I run

    select bitand(power(2, 30),power(2,29) )+0
    from dual



    I get 0, as expected. Am I running into a limitation of the bitand
    function ? Is there any documentation on this function?


    Thanks.

  • Ron

    #2
    Re: Bitand Question


    Hello Terri,

    This may be Oracle bug 1355836 - bitand() returns true for any bit
    position if bit 31 is set.

    Bug is fixed in Oracle9i.

    Regards,

    Ron
    DBA Infopower
    Enteros provides comprehensive software solutions and IT consulting services to help businesses achieve optimal results. Contact us today to learn more.

    Standard disclaimer:



    "Terry Coccoli" <request@ifneed ed.comwrote in message
    news:NF62c.1815 811$9p3.336297@ news.easynews.c om...
    Can someone tell me if the following query:
    >
    select bitand(power(2, 31),power(2,30) )+0
    from dual
    >
    >
    which returns 1073741824 is correct ? I'm thinking that the result
    should actually be 0.
    >
    >
    >
    When I run
    >
    select bitand(power(2, 30),power(2,29) )+0
    from dual
    >
    >
    >
    I get 0, as expected. Am I running into a limitation of the bitand
    function ? Is there any documentation on this function?
    >
    >
    Thanks.
    >

    Comment

    Working...