View Full Version : reverse of xor
__DuDu__
April 13th, 2001, 13:12
Hi !!
whats the reverse of XOR ?
my problem is :
a number xored by another one == 6C
what are these 2 numbers ? how can i find them ?
Regards
DuDu
davy jones
April 13th, 2001, 13:40
hmm, u cant .. u can xor 6Ch with ANY number you like, and then u will have two numbers to create 6Ch .. but without knowing the first or second xor, u cannot get the original numbers..
x xor 6c = b == b xor x = 6c ... . ? xor ? = 6c .. not possible to calculate the original values ..
10 xor x == 6c . u can calculate x .. x xor 10 = 6c, u can calculate x ...
mike
April 13th, 2001, 15:12
xor is just addition in a galois field. Your question is like asking what two numbers add up to 6c. That's one equation with two unknowns, and is therefore underdetermined. For example,
0 XOR 6C = 6C
1 XOR 6D = 6C
2 XOR 6E = 6C
3 XOR 6F = 6C
4 XOR 68 = 6C
etc...
If, however, you know two of the numbers, you can calculate the third. XOR is its own inverse, so you can use it like this:
? XOR 25 = 6C
? XOR 25 XOR 25 = 6C XOR 25
(these cancel)
? = 6C XOR 25 = 49
-newbie
April 13th, 2001, 15:52
"galois field"... lol

dude, i dont think i'm up to that maths level, but asking to reverse xor is like asking to reverse addition. u cant get a or b from a xor b, just like u cant get a or b from a+b. thats how i think of it at least.
Powered by vBulletin® Version 4.2.2 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.