![]() |
What is the meaning of XOR?
Probably a dumb question, but what exactly does XOR do in programming language, I want to learn a bit more about what is actually happening in programs, I understand stuff like jumps, compare, push and mov, but XOR I really don't know, been a long time since I was at school, I can see it is a function on a calculator, but I never used it to my knowledge.
|
XOR
It's a bit per bit exclusive OR !
Eg : OAh = 00001010 --- XOR 57h = 01010111 --- RESULT 5Dh = 01011101 |
I'm afraid I still don't quite follow
|
replace, bit per bit:
0 & 0 = 0 0 & 1 = 1 1 & 1 = 0 |
OR
Binary 101010 001001 ---------- 101011 = as long as one of the numbers is one then the out put is one eg truth table | X | Y |X+Y| | 0 | 0 | 0 | | 0 | 1 | 1 | | 1 | 0 | 1 | | 1 | 1 | 1 | XOR (Exclusive OR) only one of the input numbers can be one/(on) Binary 101010 001001 ---------- 100011 = | X | Y |X(+)Y| | 0 | 0 | 0 | | 0 | 1 | 1 | | 1 | 0 | 1 | | 1 | 1 | 0 | I hope this helps a bit R@dier |
Righto, I think I follow that now, took me a while, thanks for persisting:)
|
Just keep practicing the kick to bounce in off the side post of the net and you'll eventually get it right. :p
Regards, |
:D :D :D
|
| All times are GMT +8. The time now is 19:39. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX