Proceedings SCS '99, Iasi, Romania, July 1999 183 Using the 2 n Property to Implement an Efficient General Purpose Residue-to-Binary Converter D. Radhakrishnan, T. Srikanthan and Jimson Mathew Certre for High Performance Embedded Systems SAS, Nanyang Technological University Nanyang Ave., Singapore 639798 ph: (65) 790-6290, fax: (65) 792-6559 asdrkrishanan@ntu.edu.sg Abstract - Even though it has been shown that residue number systems (RNS) provide very fast and reliable arithmetic due to its inherent parallel processing and error correction capabilities, its use is severely limited to a few applications due to the complexities involved in its conversion circuitry. Hence the design of efficient converters is still considered an important area of research in RNS based processor designs. In this regard, we present an area efficient residue-to-binary converter based on the Chinese Remainder Theorem (CRT). It can be shown that if one of the moduli is an integer power of 2 (of the form 2 n ), we need not calculate the lower order n bits of the number while performing the reverse conversion. For a look up table implementation this will reduce the width of the table by n bits. This brings about 15% reduction in overall hardware complexity for a 32 bit reverse converter and a speed up equivalent of n full adder delays compared to previous designs. I. INTRODUCTION Residue number system (RNS) is popular in high performance arithmetic applications like Digital Signal Processing (DSP) systems because of its carry free nature, modular structure and error correcting properties [1]. It simplifies large number computation by decomposing them into a set of parallel independent computations on residues generated with respect to a convenient moduli set. Due to its arithmetic speed up, it is useful in designing recursive algorithms, mathematical transforms and digital filters. Even though RNS is capable of performing high speed arithmetic, it was not popular in general computing because of the difficulties involved in division, magnitude comparisons, forward and reverse conversions between binary and residue numbers etc. Recent work in RNS provided a number of techniques to reduce the complexity of binary-to-residue converters (BRC). But the reverse conversion from residue-to-binary is still a challenging problem haunting researchers. Hence more attention has been given to residue-to-binary transformation techniques. These approaches can be categorized into two groups, namely, Mixed Radix Conversion (MRC) and Chinese Remainder Theorem (CRT). MRC is popular for sign determination, magnitude comparison and overflow detection while CRT is more adapted to the generation of the binary number directly from its residue. The conventional architectures for the implementation of CRT algorithms are always criticized for their complex hardware requirement. In this paper we propose a method to reduce the size of the look up table used for a CRT implementation which increases the conversion speed as well. The proposed architecture uses small look up tables of size ) n ) 1 M ( log ( 2 2 n - - × , where n is the number of bits per modulus and M is the dynamic range. Using 2 n as one of the moduli, the table size can be reduced by n 2 n × bits. Altogether it reduces the hardware and increases the speed of conversion. II. RNS BASICS RNS is defined by a set of r relatively prime integers ( m 1, m 2, …, m r ) which are called the moduli. Any integer in the interval of [0,M) can be represented as a set of r residues (x 1 , x 2, …, x r ), where x i = X mod m i and ∏ = = r 1 i i m M . In RNS, arithmetic operations are computed by the formula: ( x 1, x 2, …, x r ) ⊗ ( y 1 , y 2 , … , y r ) = (z 0 , z 2 , …, z r ) where i m i i i y x z ⊗ = and ⊗ denotes one of the operations of addition, subtraction or multiplication. Thus arithmetic operations on residues can be performed in parallel