Skip Navigation


The Computer Journal Advance Access originally published online on November 23, 2007
The Computer Journal 2008 51(4):470-480; doi:10.1093/comjnl/bxm082
This Article
Right arrow Full Text
Right arrow Full Text (PDF)
Right arrow All Versions of this Article:
51/4/470    most recent
bxm082v1
Right arrow Alert me when this article is cited
Right arrow Alert me if a correction is posted
Services
Right arrow Email this article to a friend
Right arrow Similar articles in this journal
Right arrow Similar articles in ISI Web of Science
Right arrow Alert me to new issues of the journal
Right arrow Add to My Personal Archive
Right arrow Download to citation manager
Right arrowRequest Permissions
Google Scholar
Right arrow Articles by Cavagnino, D.
Right arrow Articles by Werbrouck, A. E.
Right arrow Search for Related Content
Social Bookmarking
 Add to CiteULike   Add to Connotea   Add to Del.icio.us  
What's this?

© The Author 2007. Published by Oxford University Press on behalf of The British Computer Society. All rights reserved. For Permissions, please email: journals.permissions@oxfordjournals.org

Efficient Algorithms for Integer Division by Constants Using Multiplication

D. Cavagnino* and A. E. Werbrouck

Dipartimento di Informatica, Università degli Studi di Torino, C.so Svizzera 185, 10149 Torino, Italy

* Corresponding author: davide{at}di.unito.it

Received 19 January 2007; revised 23 August 2007

We present a complete analysis of the integer division of a single unsigned dividend word by a single unsigned divisor word based on double-word multiplication of the dividend by an inverse of the divisor. The well-known advantage of this method yields run-time efficiency, if the inverse of the divisor can be calculated at compile time, since multiplication is much faster than division in arithmetic units. Our analysis leads to the discovery of a limit to the straightforward application of this method in the form of a critical dividend, which fortunately associates with a minority of the possible divisors (20%) and defines only a small upper part of the available dividend space. We present two algorithms for ascertaining whether a critical dividend exists and, if so, its value along with a circumvention of this limit. For completeness, we include an algorithm for integer division of a unsigned double-word dividend by an unsigned single-word divisor in which the quotient is not limited to a single word and the remainder is an intrinsic part of the result.

Key Words: integer division • multiplicative inverse • division by multiplication • efficiency • integer constants


Add to CiteULike CiteULike   Add to Connotea Connotea   Add to Del.icio.us Del.icio.us    What's this?




Disclaimer: Please note that abstracts for content published before 1996 were created through digital scanning and may therefore not exactly replicate the text of the original print issues. All efforts have been made to ensure accuracy, but the Publisher will not be held responsible for any remaining inaccuracies. If you require any further clarification, please contact our Customer Services Department.