One quesion about a mathmatical trick in SQL
The SQL is:
SELECT chr(to_char(bitand(p1,-16777216))/16777215)||
chr(to_char(bitand(p1, 16711680))/65535) "Lock",
to_char( bitand(p1, 65535) ) "Mode"
FROM v$session_wait
WHERE event = 'enqueue'
;
It seems to seperate high ends and the lower ends of a number. I know a little about bitand, which dose 'bit and' operation. But I'm completely confused by the 'division sign'.
Could some help expound this to me, please?
Thank you very much.
Leon