@article{Mojahed_Sabbagh_Emrani_2024, title={Magnitude Comparison and Sign Detection based on the 4-Moduli Set {2n+1, 2n−1, 2n+3, 2n−3}, volume={15}, url={https://oiccpress.com/Majlesi-Journal-of-Electrical-Engineering/article/magnitude-comparison-and-sign-detection-based-on-the-4-moduli-set-2n1-2n%e2%88%921-2n3-2n%e2%88%923/}, DOI={10.52547/mjee.15.3.93}, abstractNote={The 4-moduli set residue number system (RNS),{2n+1, 2n−1, 2n+3, 2n−3}, with a wide dynamic range, has recently been proposed as a balanced 4-moduli set for utilizing the cases that demand fast calculations such as deep learning and implementation of asymmetric cryptographic algorithms. Up to now, only an unsigned reverse converter has been designed for this moduli set. Thus, there is a need for two separate units, a sign detection circuit, and a comparator to use this set in cases requiring sign and comparison. Nevertheless, the existence of these components demands high hardware that makes the implementation of the RNS impractical. Therefore, this paper presents the design of a sign detection circuit and a signed reverse converter that can overcome this problem by reusing the hardware. To achieve an integrated hardware design, first, we optimized the previous unsigned reverse converter for this 4-moduli set and next, we derived an approach from the structure of the reverse convertor for detecting signs and recognizing comparators. Finally, using the sign signals extracted from the reverse converter, we change reverse convertor into a unit that perform sign detection and comparison. The simulation has been conducted using ISE Design Suite 14.7 tool and the Spartan6 family technology. Empirical results show that, the proposed multifunctional unit has an approximately identical performance with respect to delay and area compared to the previous reverse converter. Besides, the proposed signed reverse converter relies on a 46% and 28% reduction in area and delay compared to the previous unsigned reverse converter which uses a comparator and also a multiplexer to detect a sign in the output.}, number={3}, journal={Majlesi Journal of Electrical Engineering}, publisher={OICC Press}, author={Mojahed, Mohsen and Sabbagh, Amir and Emrani, Azadeh}, year={2024}, month={Feb.}, keywords={Computer Arithmetic, Sign Detection, Pulse width modulation (PWM) Technique, Residue Number System, Reverse Converter} }