Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / XOR & CO?

Author
Message
Olby
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 20th Feb 2006 16:25
I'm quite good with DBP now, but one thing yet I cant understand how does the XOR, NOT, ~~ commands are used? See I'm bad with english so could some1 explain it very simply and clearly so that I will understand this onece and forever.

Thanks in advance, and please try not to use very complicated math termins! THANKS AGAIN!

"Gangsters die, they don't go to heaven where angels fly!"
AMD Sempron 3.1+ Ghz, 512MB Ram, ATI R9550 256MB Ram, Sound Blaster Live!, WinXP SP2, DirectX 9.0c
SirFire
19
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 21st Feb 2006 11:05 Edited at: 24th Feb 2006 21:05
%10 XOR %01 = %11
%11 XOR %01 = %10
%01 XOR %01 = %00
%00 XOR %01 = %01
NOT %10 = %01
NOT %1 = %0
NOT %0 = %1
XOR, Exclusive OR, means that if either of the conditions are true (but not both of them), then the output is true.
NOT gives you the bitwise opposite of the input.

From the help file:
Quote: "BITWISE XOR signified by the symbol ~~ will XOR all bits of one value with another. %1111 ~~ %0011 becomes %1100."

Pretty straitforward there...
However this bit from the help file:
Quote: "BITWISE NOT signified by the symbol .. will NOT all bits of the right value. %1111 .. %1010 becomes %0101.
"

I would guess that the first value indicates which bits are to be included in the NOT operation. I've never seen NOT used in this manner.

Olby
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 21st Feb 2006 15:58
Yay, thanks a lot for explaining!

"Gangsters die, they don't go to heaven where angels fly!"
AMD Sempron 3.1+ Ghz, 512MB Ram, ATI R9550 256MB Ram, Sound Blaster Live!, WinXP SP2, DirectX 9.0c

Login to post a reply

Server time is: 2024-09-24 17:40:35
Your offset time is: 2024-09-24 17:40:35