Hello
I have got 2 variabeles in an application the type;
typedef guint32 data[8]; -> so 256 bits
Now i have a load of data of this type derrived from fileheaders.
I want to compare these and get a number of how many bits are set to 1 on the same place.
So for Ex with 8 bits
data1 : 00110011
data2 : 00100010
This should give me 2 as an answer. I don't really know how to do this i am not that expririenced. I guess ORRING the whole array with the other or something like bitshifting is what i should do but i don't know how.
Thank you very much for any help!
I have got 2 variabeles in an application the type;
typedef guint32 data[8]; -> so 256 bits
Now i have a load of data of this type derrived from fileheaders.
I want to compare these and get a number of how many bits are set to 1 on the same place.
So for Ex with 8 bits
data1 : 00110011
data2 : 00100010
This should give me 2 as an answer. I don't really know how to do this i am not that expririenced. I guess ORRING the whole array with the other or something like bitshifting is what i should do but i don't know how.
Thank you very much for any help!
Comment