Kirk Zurell's blog

Neat XOR trick

This is a neat trick using XOR, the most mysterious of the logical operators. Best of all for embedded, it requires no temporary locations.

//swap two values in place
if(x < y)
  x = x ^ y;
  y = y ^ x;
  x = x ^ y;

Et voila!


Fuzzy Logic zeitgeist, with statistics


I decided to sift through the cache of alerts ... to get a better idea of the zeitgeist of fuzzy logic. ...[F]uzzy logic is familiar enough to be used intelligently or casually, and, it turns out, to be chronically misrepresented as well.

Syndicate content