Multiplication by Integer Constants

dc.contributor.authorBriggs, Preston
dc.contributor.authorHarvey, Timothy J.
dc.date.accessioned2017-08-02T22:03:00Z
dc.date.available2017-08-02T22:03:00Z
dc.date.issued2003-10-21
dc.date.noteOctober 21, 2003
dc.description.abstractSome modern machines have no integer multiple instruction and must rely on expensive software methods to compute integer products. In other cases, the multiply instruction is significantly slower than simple integer addition. When faced with computing n*c, where n is some unknown integer value and c is a known integer constant, we can avoid the need for a general-purpose multiply by rewriting the expression in terms of shifts, adds, and subtracts—typically all one-cycle instructions. Bernstein gives a detailed discussion of the problem and presents a solution, including Ada code for its implementation. Unfortunately, the code is flawed, at least in part due to typesetting errors. It's also quite difficult to understand. This document represents an attempt to explain the elements of Bernstein's approach. At the same time, we will develop a complete, working, and hopefully understandable implementation of his approach.
dc.format.extent20 pp
dc.identifier.citationBriggs, Preston and Harvey, Timothy J.. "Multiplication by Integer Constants." (2003) https://hdl.handle.net/1911/96320.
dc.identifier.digitalTR03-425
dc.identifier.urihttps://hdl.handle.net/1911/96320
dc.language.isoeng
dc.rightsYou are granted permission for the noncommercial reproduction, distribution, display, and performance of this technical report in any format, but this permission is only for a period of forty-five (45) days from the most recent time that you verified that this technical report is still available from the Computer Science Department of Rice University under terms that include this permission. All other rights are reserved by the author(s).
dc.titleMultiplication by Integer Constants
dc.typeTechnical report
dc.type.dcmiText
Files
Original bundle
Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
TR03-425.pdf
Size:
8.07 MB
Format:
Adobe Portable Document Format