This is so embarrassing... As Piotr Piatek has patiently explained to me in private e-mail, the Gray-code algorithm I gave is equivalent to the one Warren Davis showed... I misread Warren's description and didn't realize that his "b(i)" notation referred to individual bits in n-bit words; instead, I thought each b(i) represented an entire n-bit word. My apologies, Warren. -Andy Andrew Warren - fastfwd@ix.netcom.com Fast Forward Engineering, Vista, California http://www.geocities.com/SiliconValley/2499