Keith Dowsett wrote: > > What's the fastest way to square a 10-bit number? > > Is there scope to break it down into three simpler multiplications? > > (a+b)^2 = a^2 + b^2 + 2ab > > This gives one two bit multiply (trivial) one 2 bit x 8 bit multiply > (straightforward) and one eight bit multiply (conventional but still > a bit slow) Keith: Have you coded this into PIC assembly language? I have a feeling that, in practice, it'll be slower than a standard 10-bit x 10-bit multiplication. -Andy === Andrew Warren - fastfwd@ix.netcom.com === === Fast Forward Engineering - Vista, California === === === === Custodian of the PICLIST Fund -- For more info, see: === === http://www.geocities.com/SiliconValley/2499/fund.html ===