> can you explain that why the test you mentioned
works?

Consider
  ax+0xff
changes the 0x100 bit iff the low-order byte of ax is not zero.
  ~ax
always changes the 0x100 bit.

  (~ax^(ax+0xff)) & 0x100

is zero iff both ~ax and ax+0xff have the same thing at the 0x100
position.

You can extend this logic to the other bytes.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to