DOI QR코드

DOI QR Code

The Integer Number Divider Using Improved Reciprocal Algorithm

개선된 역수 알고리즘을 사용한 정수 나눗셈기

  • 송홍복 (동의대학교 전자공학과) ;
  • 박창수 (부경대학교 누리 지능형 지구환경재해 정보관리 전문인력 양성사업단) ;
  • 조경연 (부경대학교 공과대학 전자컴퓨터정보통신공학부)
  • Published : 2008.07.30

Abstract

With the development of semiconductor integrated technology and with the increasing use of multimedia functions in computer, more functions have been implemented as hardware. Nowadays, most microprocessors beyond 32 bits generally implement an integer multiplier as hardware. However, as for a divider, only specific microprocessor implements traditional SRT algorithm as hardware due to complexity of implementation and slow speed. This paper suggested an algorithm that uses a multiplier, 'w bit $\times$ w bit = 2w bit', to process $\frac{N}{D}$ integer division. That is, the reciprocal number D is first calculated, and then multiply dividend N to process integer division. In this paper, when the divisor D is '$D=0.d{\times}2^L$, 0.5 < 0.d < 1.0', approximate value of ' $\frac{1}{D}$', '$1.g{\times}2^{-L}$', which satisfies ' $0.d{\times}1.g=1+e$, $e<2^{-w}$', is defined as over reciprocal number and then an algorithm for over reciprocal number is suggested. This algorithm multiplies over reciprocal number '$01.g{\times}2^{-L}$' by dividend N to process $\frac{N}{D}$ integer division. The algorithm suggested in this paper doesn't require additional revision, because it can calculate correct reciprocal number. In addition, this algorithm uses only multiplier, so additional hardware for division is not required to implement microprocessor. Also, it shows faster speed than the conventional SRT algorithm and performs operation by word unit, accordingly it is more suitable to make compiler than the existing division algorithm. In conclusion, results from this study could be used widely for implementation SOC(System on Chip) and etc. which has been restricted to microprocessor and size of the hardware.

반도체 집적 기술의 발달과 컴퓨터에서 멀티미디어 기능의 사용이 많아지면서 보다 많은 기능들이 하드웨어로 구현되기를 원하는 요구가 증가되고 있다. 그래서 현재 사용되는 대부분의 32 비트 마이크로프로세서는 정수 곱셈기를 하드웨어로 구현하고 있다. 그러나 나눗셈기는 기존의 알고리즘인 SRT 알고리즘의 방식이 하드웨어 구현상의 복잡도와 느린 동작 속도로 인해 특정 마이크로프로세서에 한해서만 하드웨어로 구현되고 있다. 본 논문에서는 'w bit $\times$ w bit = 2w bit' 곱셈기를 사용하여 $\frac{N}{D}$ 정수 나눗셈을 수행하는 알고리즘을 제안한다. 즉, 제수 D 의 역수를 구하고 이를 피제수 N 에 곱해서 정수 나눗셈을 수행한다. 본 논문에서는 제수 D 가 '$D=0.d{\times}2^L$, 0.5<0.d<1.0'일 때, '$0.d{\times}1.g=1+e$, $e<2^{-w}$'가 되는 '$\frac{1}{D}$'의 근사 값 '$1.g{\times}2^{-L}$'을 가칭 상역수라고 정의하고, 상역수를 구하는 알고리즘을 제안하고, 이렇게 구한 상역수 '$1.g{\times}2^{-L}$'을 피제수 N에 곱하여 $\frac{N}{D}$ 정수 나눗셈을 수행한다. 제안한 알고리즘은 정확한 역수를 계산하기 때문에 추가적인 보정이 요구되지 않는다. 본 논문에서 제안하는 알고리즘은 곱셈기만을 사용하므로 마이크로프로세서를 구현할 때 나눗셈을 위한 추가적인 하드웨어가 필요 없다. 그리고 기존 알고리즘인 SRT 방식에 비해 빠른 동작속도를 가지며, 워드 단위로 연산을 수행하기 때문에 기존의 나눗셈 알고리즘보다 컴파일러 작성에도 적합하다. 따라서, 본 논문의 연구 결과는 마이크로프로세서 및 하드웨어 크기에 제한적인 SOC(System on Chip) 구현 등에 폭넓게 사용될 수 있다.

Keywords

References

  1. Thomas L. Adams and Richard E. Zimmerman, "An Analysis of 8086 Instruction Set Usage in MS-DOS program," Proceeding of the Third International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 152-160, Apr. 1989
  2. D. L. Harris, S. F. Oberman, and M. A. Horowitz, "SRT Division Architectures and Implementations", Proc. 13th IEEE Symp. Computer Arithmetic, Jul. 1997
  3. E. Artzy, J. A. Hinds, and H. J. Saal, "A Fast Division Technique for Constant Divisors," Communications of the ACM, Vol. 19-2, pp. 98-101, Feb. 1976
  4. S. Y. R. Li, "Fast Constant Division Routines, " IEEE Transactions on Computers, Vol. C34-9, pp. 866-869, Sep. 1985
  5. Daniel J. Magenheimer, Liz Peters, Karl Pettis, and Dan Zuras, "Integer Multiplication and Division on the HP Precision Architecture," Proceedings of the Second International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 90-99, Apr. 1987
  6. M. Flynn, "On Division by Functional Iteration", IEEE Transactions on Computers, Vol. C-19, No.8, pp. 702-706, Aug. 1970 https://doi.org/10.1109/T-C.1970.223019
  7. R. Goldschmidt, Application of division by convergence, master's thesis, MIT, Jun. 1964
  8. D. L. Fowler and J. E. Smith, "An Accurate, High Speed Implementation of Division by Reciprocal Approximation", Proc. 9th IEEE symp. Computer Arithmetic, IEEE, pp. 60-67, Sep. 1989
  9. S. Oberman, "Floating Point Division and Square Root Algorithms and Implementation in the AMD-K7 Microprocessors", Proc. 14th IEEE Symp. Computer Arithmetic, pp. 106-115, Apr. 1999
  10. D. DasSarma and D. Matula, "Measuring and Accuracy of ROM Reciprocal Tables", IEEE Transactions of Computer, Vol. 43, No. 8, pp. 932-930, Aug., 1994 https://doi.org/10.1109/12.295855
  11. Matthew Frank, "DESIGN OF AN INTEGER RECIPROCAL ALGORTIHM", www.cag.lcs.mit. edu/raw/memo/12/div.html, Aug. 1999
  12. Robert Alverson, "Integer Division Using Reciprocals," Proceedings of the Tenth Symposium on Computer Arithmetic, Grenoble, France, pp 186-190, Jun. 1991

Cited by

  1. 곱셈기를 사용한 배정도 정수 나눗셈기 vol.14, pp.3, 2008, https://doi.org/10.6109/jkiice.2010.14.3.637