156 IEEE TRANSACTIONS ON EDUCATION, VOL. 54, NO. 1, FEBRUARY 2011 How to Teach Residue Number System to Computer Scientists and Engineers Keivan Navi, Amir Sabbagh Molahosseini, and Mohammad Esmaeildoust Abstract—The residue number system (RNS) has been an im- portant research field in computer arithmetic for many decades, mainly because of its carry-free nature, which can provide high-performance computing architectures with superior delay specifications. Recently, research on RNS has found new directions that have resulted in the introduction of efficient algorithms and hardware implementations for RNS with much better perfor- mance than previous ones. Furthermore, the applicability of RNS in many computer and digital signal processing (DSP) applications has simultaneously greatly increased. Hence, the need is evident for the development of a new and well-organized RNS teaching method with emphasis on recent achievements. In this paper, a step-by-step teaching process for RNS that describes RNS design in separate parts is presented. Each part is investigated in detail, taking into account the recent research performed on RNS. The compatibility of the proposed method with the new RNS research trends makes this method suitable for researchers as well as students. Index Terms—Forward converter, moduli sets, residue arith- metic, residue number system (RNS), reverse converter. I. INTRODUCTION T HE residue number system (RNS) is principally taught to graduate students; an introduction to RNS can also be taught as a part of a computer arithmetic course for graduate or undergraduate students of computer science or engineering. Recently, new algorithms and architectures have been intro- duced that make RNS less difficult to use, which has led to improvement in the performance of RNS. The resources used for teaching are mainly based on chapters of the books [1] and [2]. These describe RNS in a general way, but while giving a good introduction to RNS, these textbooks do not cover new achievements in the field. The major issues in efficient design of RNS are the moduli set selection, forward conversion, residue arithmetic unit, and reverse conversion. Each RNS system is based on a moduli set, which involves a set of pair-wise relatively prime integers. The dynamic range of an RNS system is defined in terms of the product of the moduli, and it denotes the interval of inte- gers exclusively represented in RNS. The forward converter de- composes a weighted binary number into a residue represented number with regard to the moduli set. The residue arithmetic unit includes a modular adder, subtractor, and multiplier for each Manuscript received July 11, 2009; revised October 12, 2009; accepted March 31, 2010. Date of publication May 03, 2010; date of current version February 02, 2011. K. Navi and M. Esmaeildoust are with the Faculty of Electrical and Computer Engineering, Shahid Beheshti University, Tehran 1983963113, Iran (e-mail: navi@sbu.ac.ir; m_doust@sbu.ac.ir). A. S. Molahosseini (amir.sabbagh@sr.iau.ac.ir) is with the Microelectronic LAB, Shahid Beheshti University, Tehran 1983963113, Iran. Digital Object Identifier 10.1109/TE.2010.2048329 modulo channel. The reverse converter transforms a residue rep- resented number into its equivalent weighted binary number. To understand RNS, each issue, with its related problems and de- sign methods, must be carefully investigated. The fundamental concepts that should be covered in RNS teaching can be classified as follows: 1) the definition of RNS with its properties and some impor- tant applications; 2) moduli set selection considerations; 3) forward converter design; 4) residue arithmetic unit parts; 5) reverse converter design. In this paper, a five-step teaching method is presented that takes into account new research achievements in realizing RNS. First, the principle of RNS with a numerical example is explained in Section II. Next, considerations in the selection of the moduli set, with the significant impact of this on different parts of RNS, are described in Section III. Forward converter design is sur- veyed in Section IV. Section V provides an overview of the residue arithmetic unit with concentration on modulo adder and multiplier design. The reverse converter, which is the most com- plex part of RNS, is investigated in Section VI. Finally, assess- ment results and achievements are presented in Section VII. II. RESIDUE NUMBER SYSTEM The RNS is an unconventional number system that is defined in terms of relatively prime moduli set that is for . A weighted number can be represented as , where (1) Such a representation is unique for any integer in the range , where is the dynamic range of the moduli set , which is equal to the product of terms [3]. In RNS, the weighted operands are converted into residue rep- resentations by a forward converter. Then, arithmetic operations such as addition, subtraction, and multiplication are performed on RNS numbers in parallel without carry propagation between residue digits. Hence, RNS results in parallel and high-speed addition, subtraction, and multiplication. Each modulus of the moduli set has its own arithmetic processor that consists of a modulus adder, a modulus subtractor, and a modulus multiplier. Next, to use the result of arithmetic operations outside of RNS, the resulted RNS number should be converted into its corre- sponding weighted binary number by using a reverse converter. Fig. 1 shows the block diagram of a typical RNS system. 0018-9359/$26.00 © 2010 IEEE