Priyanka
Priyanka

Reputation: 2832

How to retrive decimal values back by applying any binary operation?

I have 2 or more than that decimal values , I' m converting these values to binary and applying binary operator and then I'm getting single binary value in mysql.

And then I have to use this generated binary in C# and convert that binary value back to decimal values.

Sample Calculation
suppose 1,2 are two decimal values 
binary representation is 001 , 010
if I apply AND operation in mysql then I'm getting 000 as result
now I want to again apply some binary operator on 000 and convert it back to 1,2 in C#

How to do this ? or Is it possible ?

Upvotes: 0

Views: 83

Answers (1)

Aage
Aage

Reputation: 6252

There's no way to tell from 000 that it's a result of a binary operation on 1 and 2.

You'd have to store the values somehow.

Upvotes: 1

Related Questions