The invention pertains to an improved method for generating ALU instruction
sequences for performing integer multiplication. The invention
analytically helps to find an optimal sequence of shift, add and subtract
instructions for performing integer multiplication by trying to add or
subtract all powers of 2 less than the integer multiplier itself and then
trying to factor evenly the resulting sum or difference by that power of 2
plus or minus one. If each such resulting factor value factors by a power
of 2, the corresponding factor set is a favorable one for generating an
optimal ALU instruction sequence.