Anyone who aspires to bit-twiddling must check out: http://www.hackersdelight.org/index.htm http://www.hackersdelight.org/HDcode.htm I just bought Dr. Henry Warren's (hmm, perhaps related to Andy?) book, "Hacker's Delight". It's an outstanding collection of algorithms ranging from obfuscated bit twiddling to classical multiplication. Scott -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.