Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Reversing 'And' operation

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Freiza
Grandmaster Cheater
Reputation: 22

Joined: 28 Jun 2010
Posts: 662

PostPosted: Sun Sep 26, 2010 5:17 pm    Post subject: Reversing 'And' operation Reply with quote

suppose var1 == 11001111
var2 == 00000100

var1 + var 2 == 00000100 (let us say it var 3)

what operation on var3 can i make so that i can get var1 again for any numbers.

ie var3 (some operation) (value) = var1
Back to top
View user's profile Send private message Send e-mail
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sun Sep 26, 2010 5:27 pm    Post subject: Reply with quote

i fucked up, poster below has it right

Last edited by Slugsnack on Sun Sep 26, 2010 5:28 pm; edited 2 times in total
Back to top
View user's profile Send private message
XaLeX
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 226

PostPosted: Sun Sep 26, 2010 5:27 pm    Post subject: Reply with quote

You can't.
0 & 0 = 0 & 1 = 1 & 0 = 0
this means that a zero in var3 can be originated by three combinations of var1 and var2, and you can't just "reverse" it.

The only thing you can tell is what bits of both var1 and var2 are surely set, that is, the ones that are set in var3.
Back to top
View user's profile Send private message
Freiza
Grandmaster Cheater
Reputation: 22

Joined: 28 Jun 2010
Posts: 662

PostPosted: Sun Sep 26, 2010 5:31 pm    Post subject: Reply with quote

i thought as xoring twice brings up the same result .
then there must be some way out..
Back to top
View user's profile Send private message Send e-mail
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sun Sep 26, 2010 5:42 pm    Post subject: Reply with quote

think about it logically. if you have a 0 result bit and you know one of the original bits was 1 then yes, the other is 0. if the other original bit you do know was 0 however you don't know what the other bit could've been.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites