Excellent idea! Nultiplying by constant in such way what every original bit from A being transferred into reversed position in result's high register. Since multiple positions resulted divison is used at the end. Can be implemented on PIC's with hardware multiplication as well I think. I like the way Gosper and Freiberg thought. ;) Add/sub operations are capable to shift bits simultaneously to the same distance while mul/div can move each bit differently. Interesting... WBR Dmitry. William Chops Westfield wrote: > > People have been designing clever bit-reversal algorithms since the 60s, (do > a net search for "hakmem and Schroeppel" for some nasty code that reverses 6 > or 7 bits in 3 instructions, or 8 bits in 4 instructions (involves 36 bit > multiplications and divisions!)) I have a hard time believing that it's > ever important enough to build special purpose hardware within a processor > to do it. I mean, the only time the actual order of the bits is relevant is > when doing math, and doing math and logical-bit operations on the same > numbers is pretty rare. It's always easier to simply make your external > shift registers shift the other direction, or re-think the problem. I think > I used a bit-reversal algorithm in a graphics hack once, but only because I > wanted the leftmost bits on the printer to match the leftmost bits in the > memory; and that was quite arbitrary; there's no reason that the MSB of a > word has to be thought of as being "on the left." > > BillW > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads