AnsweredAssumed Answered

Is it possible to do memcmp by bits instead of bytes?

Question asked by Utsavi Kalpesh Bharuchwala on Jul 15, 2014
Latest reply on Jul 16, 2014 by Utsavi Kalpesh Bharuchwala



I have created a project in which I am comparing bytes by memcmp().


But problem is memcmp compares only bytes.


Code I have written is :


StateChange = memcmp(&CurrentState, &PreviousStates, sizeof(CurrentState));


Here I have compare this two variables,but I want to compare individual bits.


So can anybody tell me how to compare bits by using memcmp () or Is there any other way (except xor) then plz let me know.


I am using MQX v4.0 and codewarrior 10.2.


Plz Help