Changes

Jump to: navigation, search

Programming:Integer Multiplication

129 bytes added, 01:59, 8 May 2007
/* Faster, accurate 8bit * 8bit Unsigned */
16K is a lot of memory to use for tables, but I'm working on a way to reduce this to 8K while maintaining similar performance (around 26μs). The idea is rather than using tables for the low and high nibbles, use tables for alternate bits. So there would be 16 tables for the values #00, #01, #04, #05, #10, #11, #14, #15, #40, #41, #44, #45, #50, #51, #54, #55. The values can be shifted by 1 (rather than 4) to give values for the alternate bits using a simple ADD HL,HL.
 
This routine should be easy to adapt to a 16bit * 8bit unsigned multiplication or even a 16bit * 16bit, using simple additions.
[[User:Executioner|Executioner]] 03:58, 8 May 2007 (CEST)
151
edits