Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: XOR Functions...
You could have a look at the utl_raw package, alternatively you could fiddle about with the BITAND function - which takes two numbers up to 2^32 -1 (I think) and ANDs them.
A XOR B is then:
( A OR B) AND (NOT A and NOT B)
which is
NOT(NOT A and NOT B) AND (NOT A and NOT B)
where NOT X is (2^32 -1) - X
It's going to end up looking a bit messy though.
--
Jonathan Lewis
Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk
Antony Giblin wrote in message
<938449026.16137.1.nnrp-10.c2de09a4_at_news.demon.co.uk>...
>Does anyone know how I can XOR two Integers and return an integer,
>i.e. (INTa XOR INTb) = INTc
>Thanks,
>Tony Giblin.
>
>
Received on Mon Sep 27 1999 - 13:14:28 CDT
![]() |
![]() |