<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">WET</journal-id><journal-title-group><journal-title>Wireless Engineering and Technology</journal-title></journal-title-group><issn pub-type="epub">2152-2294</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/wet.2013.44029</article-id><article-id pub-id-type="publisher-id">WET-38683</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Computer Science&amp;Communications</subject></subj-group></article-categories><title-group><article-title>
 
 
  Parallel Algorithms for Residue Scaling and Error Correction in Residue Arithmetic
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>ao-Yung</surname><given-names>Lo</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Ting-Wei</surname><given-names>Lin</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>Department of Electrical Engineering, National Tsing Hua University, Hsinchu City, Chinese Taipei</addr-line></aff><author-notes><corresp id="cor1">* E-mail:<email>hylo@ee.nthu.edu.tw(AL)</email>;</corresp></author-notes><pub-date pub-type="epub"><day>24</day><month>09</month><year>2013</year></pub-date><volume>04</volume><issue>04</issue><fpage>198</fpage><lpage>213</lpage><history><date date-type="received"><day>August</day>	<month>3rd,</month>	<year>2013</year></date><date date-type="rev-recd"><day>September</day>	<month>11th,</month>	<year>2013</year>	</date><date date-type="accepted"><day>September</day>	<month>30th,</month>	<year>2013</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
   In this paper, we present two new algorithms in residue number systems for scaling and error correction. The first algorithm is the Cyclic Property of Residue-Digit Difference (CPRDD). It is used to speed up the residue multiple error correction due to its parallel processes. The second is called the Target Race Distance (TRD). It is used to speed up residue scaling. Both of these two algorithms are used without the need for Mixed Radix Conversion (MRC) or Chinese Residue Theorem (CRT) techniques, which are time consuming and require hardware complexity. Furthermore, the residue scaling can be performed in parallel for any combination of moduli set members without using lookup tables.  
    
 
</p></abstract><kwd-group><kwd>Chinese Remainder Theorem (CRT); Error Correction; Error Detection; Parallel Residue Scaling; Residue Number Systems (RNS); Target Race Distance (TRD); Target Residue-Digit Difference</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Because the residue number system (RNS) operations on each residue digit are independent and carry free property of addition between digits, they can be used in highspeed computations such as addition, subtraction and multiplication. To increase the reliability of these operations, a number of redundant moduli were added to the original RNS moduli [RRNS]. This will also allow the RNS system the capability of error detection and correction. The earliest works on error detection and correction were reported by several authors [1-12]. Waston and Hasting [1,2] proposed the single residue digit error correction. Yau and Liu [<xref ref-type="bibr" rid="scirp.38683-ref3">3</xref>] suggested a modification with the table lookups using the method above. Mandelbaum [4-6] proposed correction of the AN code. Ramachandran [<xref ref-type="bibr" rid="scirp.38683-ref7">7</xref>] proposed single residue error correction. Lenkins and Altman [8-10] applied the concept of modulus projection to design an error checker. Etzel and Jenkins [<xref ref-type="bibr" rid="scirp.38683-ref11">11</xref>] used RRNS for error detection and correction in digital filters. In [12-16] an algorithm for scaling and a residue digital error correction based on mixed radix conversion (MRC) was proposed. Recently Katti [<xref ref-type="bibr" rid="scirp.38683-ref17">17</xref>] has presented a residue arithmetic error correction scheme using a moduli set with common factors, i.e. the moduli in a RNS need not have a pairwise relative prime.</p><p>In this study, we developed two new algorithms without using MRD (Mixed-radix digit) or CRT (Chinese remained Theorem) for speeding-up the scaling processes and simplifying the error detection and correction in RNS. The first algorithm is used for these purposes, through the residue digit difference cyclic property (CPRDD) within the range of<img src="7-6801081\a9c8d317-7fcd-4af9-b0a6-ed36362d3f3d.jpg" />, where <img src="7-6801081\8ad8181f-fb72-49fb-9da7-94509ad6afc9.jpg" /> with r additional moduli. The moduli <img src="7-6801081\1327c2f1-be94-4584-a49d-40cb8b44fce9.jpg" /> are called the nonredundant moduli; <img src="7-6801081\265d5ecc-fd19-4723-b89f-0c417382e5f7.jpg" />are the redundant moduli. The interval, <img src="7-6801081\b586a9bd-c4c9-46ff-b499-a5b624caad9f.jpg" />, is called the legitimate range, where<img src="7-6801081\f33f490f-b387-44f4-80b7-18bb61284cbf.jpg" />, and the interval,</p><p><img src="7-6801081\95498fff-78fc-4c09-a8b9-d96a59352fde.jpg" />, is the illegitimate range, where</p><p><img src="7-6801081\fee9cd4b-c97c-4262-b5e7-d45624fec84a.jpg" />, and <img src="7-6801081\596d330d-a183-41e2-bd29-52bac9779267.jpg" /> is the total range. This paper is organized as follows: Section II will describe the scheme the cyclic property of residue digit difference (CPRDD). Section III describes the Target Race Distance (TRD) algorithm and followed by some examples. Section IV discusses residue scaling and error correction using the TRD and CPRDD algorithms. Finally, the conclusion is given in section V.</p></sec><sec id="s2"><title>2. Error Detection and Correction Using Residue Digit Difference Cyclic Property</title><p>Any residue digit x<sub>i </sub>representation in moduli set</p><p><img src="7-6801081\3667e30a-c731-4f4b-840e-85f43b18d1ff.jpg" />has its cyclic length with respect to its module number. For example, if the moduli set is (4, 5, 7, 9), then the cyclic lengths of any residue digits</p><p><img src="7-6801081\11dd2a99-eee8-4c55-85ca-29f547c2fbf0.jpg" />are 4, 5, 7 and 9, respectively. Since these cyclic lengths are not equal, they are very difficult to use as tools for error detection and correction. Actually, there exists the property of common (uniform) cyclic length in RNS between residue digital-differences (RDD). Consider three moduli set<img src="7-6801081\07c3e569-6a93-4980-9c62-bfc79d62bfa2.jpg" />. The residue representations and their corresponding digit-differences are shown in <xref ref-type="table" rid="table1">Table 1</xref> and defined as the difference in value between two digits, <img src="7-6801081\489ad624-072c-42dd-91b2-ae734d7c80c6.jpg" />where <img src="7-6801081\e78c397c-9bba-4a83-8d1e-8d7cd9636df2.jpg" />s are all modulo to positive values with respect to <img src="7-6801081\088c4646-459e-4a5f-ab3c-6d7b7952ebd2.jpg" /> if the cycle length of <img src="7-6801081\5ccbd102-c5ab-441d-a1d1-0cf807bf6e22.jpg" /> is assigned.</p><p>Note that the residue digit-differences <img src="7-6801081\17ba42fc-5061-4a91-8d05-a213cdd21fae.jpg" /> in <xref ref-type="table" rid="table1">Table 1</xref> are obtained from <img src="7-6801081\eedc09dd-352c-461a-95c8-27f9af98cd3c.jpg" /> if<img src="7-6801081\9056403d-9330-495a-8b68-31c3d523626e.jpg" />, and from <img src="7-6801081\54ede6f5-499a-450f-86ac-63867ed44aea.jpg" /> if<img src="7-6801081\a59b4440-8aa3-490a-85e4-224c24088583.jpg" />. This difference of</p><p><img src="7-6801081\4ce000b5-6631-47f3-a931-35ce49ad8d54.jpg" />or <img src="7-6801081\0fce57cb-068d-439e-909e-adbae0c0ceb3.jpg" /> in values may be positive or negative, depending upon <img src="7-6801081\f3d1e934-8e7c-462a-bdc0-37013da4e7bf.jpg" /> or <img src="7-6801081\6118f8d5-b19d-4785-94e3-1faba9ae8d82.jpg" /> and</p><p><img src="7-6801081\b3be1a7a-f3b0-46a3-b575-7e77009afc3f.jpg" />or <img src="7-6801081\6442ee08-ca91-4005-9ad3-1814c20fbb26.jpg" /> respectively All negative values must be modulo to positive values. For example, on starred row 28, as shown in <xref ref-type="table" rid="table1">Table 1</xref>, the digit difference in value for <img src="7-6801081\0760cb56-4466-4b31-a39b-7ee392989675.jpg" /> and <img src="7-6801081\fbe38017-3da5-4b94-a688-65ceace811ab.jpg" /> is</p><p><img src="7-6801081\03ae8fd2-df26-4be6-9273-b84a7f1a268d.jpg" />. It results in <img src="7-6801081\e122284a-2335-4c7e-aaac-b0c95352d544.jpg" /></p><p>From the cyclic property of residue-digit difference (CPRDD) in RNS, we now have the following theorem.</p><p>Theorem 1. For a moduli set</p><p><img src="7-6801081\f9d887fc-b444-44ba-9b69-b0664395d285.jpg" />and residue representation for <img src="7-6801081\d02db044-73eb-47c9-aad8-2c08bd5827da.jpg" /> in RNS, there exists a cyclic property in differences between two residue digits,</p><p><img src="7-6801081\cef0d1af-5277-46a0-bda7-9aacf5ef477a.jpg" />or<img src="7-6801081\94542cd3-5d2d-4f67-a9ed-688aeb754ac9.jpg" />. The cyclic length can be assigned, either to <img src="7-6801081\5a7ab180-8098-4246-a6dc-b9b9c37eb656.jpg" /> or<img src="7-6801081\7f00d6a6-5d86-4fd2-817c-6749b5ff459c.jpg" />, depending upon modulo operation with respect to <img src="7-6801081\bf05436b-ff73-4f36-b28a-15ef6a512470.jpg" /> or<img src="7-6801081\19f3ef11-5a98-49ca-af3d-ab60eade7b9a.jpg" />.</p><p>Proof: Consider the case respective to<img src="7-6801081\0a05e159-6df7-4c97-8a41-f487360316eb.jpg" />, the residue-digit difference (RDD) between two digits in</p><p><img src="7-6801081\aff62db3-8edb-4fa1-9bac-940881c17176.jpg" />can be in general expressed by the equation</p><disp-formula id="scirp.38683-formula135128"><label>(2-1)</label><graphic position="anchor" xlink:href="7-6801081\71c44218-112a-4137-a878-9458d88e8190.jpg"  xlink:type="simple"/></disp-formula><p>where <img src="7-6801081\163de8f0-a8cc-4cd9-aa12-032a99e26bcd.jpg" /></p><p><img src="7-6801081\60a76186-1a09-4a87-802c-3d6fe4ca0f17.jpg" /></p><p>and <img src="7-6801081\84e45e6d-2cb4-4456-bc28-3bc93f1d8569.jpg" /> are integers.</p><p>For simplicity, we only consider the case of <img src="7-6801081\0c85d5b9-0b76-4e12-9470-feb7c4c8a817.jpg" /> and assume<img src="7-6801081\f8694d01-ac27-4bc4-be5e-a1139be82e85.jpg" />, and the case of <img src="7-6801081\d5885a98-9f2e-40ff-b5fa-f0f06ea46807.jpg" /> can be obtained in a similar way.</p><p>The related theorem and algorithm are described as follows.</p><p>1) In cycle 0, (the initial cycle), we have</p><p><img src="7-6801081\cdb07c1d-96d9-4fb5-ba86-2cd7ee2cdfc7.jpg" />with<img src="7-6801081\8c15aa80-3c73-404d-af37-c25c59e3b271.jpg" />,</p><p><img src="7-6801081\e51cc21b-7c3a-45db-8e63-852cc238048b.jpg" />As <img src="7-6801081\f925af5e-8433-44ca-826a-6ed5eede7316.jpg" /></p><table-wrap-group id="1"><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Cyclic property of Residue Digit Difference</title></caption></table-wrap-group><p><img src="7-6801081\b3fe0aca-d76c-46eb-8372-7d732171193e.jpg" />with<img src="7-6801081\f304932c-c1ee-4e94-a0e2-54a6eb5ba9df.jpg" />, we have<img src="7-6801081\ab48dc07-6840-46e9-836a-3b4d036b9716.jpg" /> with m<sub>j</sub>’s 0s in cycle 0, where <img src="7-6801081\1e284bab-24f4-4cc1-8ac4-085aa6526b9c.jpg" /> means the largest integer less than or equal to x.</p><p>Thus, the RDD has m<sub>j</sub>’s “0” in the initial cycle for each modulus, i.e., in cycle 0, <img src="7-6801081\019a4a9b-3e5f-4cde-9d53-6e418fb0a4a1.jpg" />for all<img src="7-6801081\da9a18a2-b02e-4d24-9a4e-ed5a05afcdbb.jpg" />.</p><p>2) Next consider each modulus<img src="7-6801081\5bfc03ba-7c7f-4158-8be9-f7edaaa9a5bd.jpg" />Since <img src="7-6801081\6715c0d3-dfa3-42ae-8359-d949dd9c91d8.jpg" /> and<img src="7-6801081\166710dc-c995-496f-a657-61c446faf0d5.jpg" />then</p><p><img src="7-6801081\100425ce-81bc-48aa-9430-a9bc2f7da917.jpg" />where</p><p><img src="7-6801081\121d3170-2ef2-4e98-b56a-f190809b58a3.jpg" /></p><p><img src="7-6801081\eef4be54-4635-47a9-8bd9-24ec46d272a4.jpg" /></p><p>For RDD = 0 (for cycles<img src="7-6801081\d412c910-931c-4bd6-8735-7ef14db4b1af.jpg" />)</p><p>then</p><p><img src="7-6801081\dbcbe742-a9e6-4f5c-a5d1-7d3db27d5008.jpg" /></p><p>with m<sub>j</sub>’s 0 s.</p><p>For RDD = 1 (not necessary in cycle 1),</p><p><img src="7-6801081\2a6609a6-9233-47a6-a0fe-d3abf9c2a722.jpg" />with m<sub>j</sub>’s 1 s.</p><p>…</p><p>For RDD = m<sub>i</sub> − 1</p><p><img src="7-6801081\5e571fc7-dc06-4cca-b4b8-60265cc36c3b.jpg" /></p><p>with <img src="7-6801081\4c633052-3f2f-4e28-b844-caa49d05547b.jpg" /> s.</p><p>Corollary 1. From the above theorem, we can immediately obtain that each cycle in the residue-digit difference of x will start at location 0, and end at location</p><p><img src="7-6801081\0f8837e9-8cf5-479c-b83b-6c35cd5bbb22.jpg" />.</p><p>Corollary 2. It is easily shown that there exists m<sub>i</sub> number of cycles with respect to the cyclic length of<img src="7-6801081\211c7841-5247-419a-a911-c973bef0be71.jpg" />.</p><p>Proof. Since the residue-digit difference of</p><p><img src="7-6801081\da2b4b86-d252-4e37-9908-5e5bbe34d733.jpg" />representation is pair-wise, the legitimate range of this pair-wise <img src="7-6801081\7600810f-2b15-40ff-bff7-89b6d6b8404c.jpg" /> is<img src="7-6801081\e54e648b-d067-4cc8-891f-471dbb3125fe.jpg" />, (from 0 through<img src="7-6801081\0a3b29d2-0e35-40e6-869c-0ef0ea21f5ef.jpg" />). From corollary 1, the cyclic length is<img src="7-6801081\a7ac8b83-6eea-4d7a-94e7-0bdf6dd74118.jpg" />. Thus the number of cycles within this cyclic length for <img src="7-6801081\1ae09c0a-197d-45d5-b1e3-f711c68bb757.jpg" /> is<img src="7-6801081\92937329-4dbe-49d7-825e-2d3f38e9a054.jpg" />, and for<img src="7-6801081\dd2363bd-a1d2-4f18-bfaf-1521d9ac2c4e.jpg" />.</p><p>Theorem 2. The algorithm of theorem 1 and its corollaries can be extended to two or more pair-wise residuedigit differences.</p><p>Proof: consider a three moduli set, we have two pairwise moduli sets, whose RDD (Residue Digital Difference) is</p><p><img src="7-6801081\460b8643-8a42-471b-aa80-5812f91e1399.jpg" /></p><p>where <img src="7-6801081\15e0fe7f-2f6c-454d-94b2-5ca937b1962b.jpg" /> is again the referenced module.</p><p>Follow the same procedure as step (2) as above.</p><p>Assume<img src="7-6801081\c8e197e4-d5d4-4e47-8f7f-23eaf5a8139e.jpg" />, and also pair-wise numbers</p><p><img src="7-6801081\5ef08272-090b-4940-a9b2-d5f1755c5d44.jpg" />and</p><p><img src="7-6801081\47171ecf-573f-49eb-beb2-ee1d99ae65b5.jpg" />.</p><p>1) For <img src="7-6801081\8a18f1ac-a4f5-4500-bbd9-9bb0ec9356df.jpg" /></p><p>thus</p><p><img src="7-6801081\808ef32f-d609-4498-a592-1f0bd48ad314.jpg" /></p><p><img src="7-6801081\7076ae9d-1c06-4ee8-b704-cf5b13daf2cb.jpg" />“0” r<sub>2</sub>’s “<img src="7-6801081\debfe3a9-e72a-41fd-84e5-64f946fcf6a9.jpg" />”<img src="7-6801081\b2659797-f846-4b47-92d3-c0013b5844fc.jpg" /></p><p>This shows that <img src="7-6801081\d429cd17-a407-4989-9a9f-a0320c51d907.jpg" /> has also <img src="7-6801081\c8b80181-1222-4443-8553-320d2d094129.jpg" /> “0”s in cycle 0 of<img src="7-6801081\8fc93b7d-a26a-478b-b1cc-b50fa587c417.jpg" />. The cyclic length is<img src="7-6801081\a9a80e0a-e0e7-4368-bdc9-9c7404d011b1.jpg" />, and the number of cycles for <img src="7-6801081\045445e5-b119-4c7d-b74f-7b3103dc91c9.jpg" /> is<img src="7-6801081\91e05875-90ef-473a-be99-9f19f4a3dd0b.jpg" />.</p><p>2) For <img src="7-6801081\1d58b82b-3798-4290-9b13-f53cae985a31.jpg" /> and <img src="7-6801081\b794d8ac-fa68-4bd0-a54f-d2606f097b08.jpg" /> (a constant for any RDD), if <img src="7-6801081\a4aea4c2-6a53-4a52-8265-a40ec433d0e7.jpg" /></p><p><img src="7-6801081\fee931f4-6f7c-4e26-9977-74038bbbe584.jpg" /></p><p>This shows that the <img src="7-6801081\77bef7e9-2658-4645-9758-2356687686ad.jpg" /> in any location has also <img src="7-6801081\d666cb8e-2efa-4b2f-a473-f3561ca69f3a.jpg" /> <img src="7-6801081\c1f85f28-9c0c-4ce3-a767-6f32f78f2acb.jpg" /> in cycle i of<img src="7-6801081\2666fa92-3115-493f-80d1-804f7c4a4191.jpg" />. The number of cycles for <img src="7-6801081\bdf510d1-7d8d-4814-8552-2c8c45319387.jpg" /> is still<img src="7-6801081\fbcad207-e00f-4005-8ff1-18ade8a20531.jpg" />. Combining these three moduli <img src="7-6801081\620a44d4-cac5-4a32-bf79-c1ff652fb4df.jpg" /> into one set, we have cyclic length <img src="7-6801081\6ae91786-16ff-41b2-b45c-ef8b4c8edab8.jpg" /> (for example,</p><p><img src="7-6801081\debc5cca-ed33-482e-b719-164d468c0280.jpg" />). The number of cycles for</p><p><img src="7-6801081\e311df05-003a-4f2f-9930-e9a44eeb9ecc.jpg" />are<img src="7-6801081\f2e43d09-f6d3-460a-b51e-9e8cc5870f5d.jpg" />,</p><p><img src="7-6801081\a2091202-23e5-4b94-bb68-29fc8fd07bf1.jpg" />, and<img src="7-6801081\4ba6c1db-f1bf-4ed6-bc49-e9059146aded.jpg" />, respectively. As shown in <xref ref-type="table" rid="table1">Table 1</xref>, the RDD pairs of</p><p><img src="7-6801081\ffee06c2-1536-4901-a377-316e5734d796.jpg" />, and</p><p>(1, 1)</p><p>In general, <img src="7-6801081\f70e16f7-e933-485f-9e22-2eba482a5a5e.jpg" />and</p><p><img src="7-6801081\f4844338-ccb7-4930-9773-4bf6233d8b44.jpg" />with <img src="7-6801081\421cf19d-3d6a-4728-ab94-de86d3cce950.jpg" /> rows and <img src="7-6801081\f48770c1-396e-4b27-8b5b-821f4e025e95.jpg" /> in each row.</p><p>This completes the proof.</p><p>Example 2-1.</p><p>Consider a moduli set<img src="7-6801081\b69013b8-f513-4496-adc2-f01a4cabd64d.jpg" />, <img src="7-6801081\d179cf2f-8076-4b89-99f8-18dcc15b3705.jpg" />and its corresponding residue digits representation set is<img src="7-6801081\1d4c2789-14d9-4e46-a56a-4090c4da6a9a.jpg" />. The cyclic length is <img src="7-6801081\821a8e04-08ce-48c9-882b-4d6cc6f1ecf5.jpg" /> and the number of cycles for<img src="7-6801081\38cadfd3-1f36-4ce3-a57b-c53f3c937a09.jpg" />, and <img src="7-6801081\ac411a1d-236f-4162-a925-e641906a2382.jpg" /> are</p><p><img src="7-6801081\c5ab1c6c-7028-4ad8-9864-cdb78d65ee89.jpg" />, and<img src="7-6801081\462c4ebb-6cd5-4364-bf8e-e7d1f3606e1e.jpg" />, respectively.</p><p>Error detection and correction:</p><p>Before the CPRDD algorithm used for error detection and correction is described, some basic terms in use must be defined.</p><p>Definition 1: Stride distance<img src="7-6801081\babe2715-2180-4326-be78-2862e188c213.jpg" />: It is the incremental or decremental distance between moduli <img src="7-6801081\3d5ecc86-f400-400f-8a9d-18b572f7f545.jpg" /> and <img src="7-6801081\301b2dab-ecd0-46dd-9d4f-b534ff5163ed.jpg" /> in absolute value from ith cycle to <img src="7-6801081\9bf2de66-2433-48b7-be31-0dd90888c189.jpg" /> cycle.</p><p>For example:<img src="7-6801081\467117f7-1f63-4e28-9810-17386d83b780.jpg" />.</p><p>(1) Error detection Let the moduli set be</p><p><img src="7-6801081\a17a7312-2903-468d-be4e-9c55051bfc51.jpg" />where <img src="7-6801081\4041b693-5cec-4e05-877f-fb51e5250f05.jpg" /> are the nonredundant moduli and <img src="7-6801081\93253684-825a-45a2-9578-8d45ea94a901.jpg" /> are the redundant moduli. Since the cyclic lengths of CPRDD <img src="7-6801081\a548b8dc-6c7e-4dcb-ab55-8ed73a0ff020.jpg" /> are constant, it is thus easily found that the number of cycles on track <img src="7-6801081\2a75b9e2-9e4f-49f2-870a-95531bd143c6.jpg" /> from the starting point 0 (or other<img src="7-6801081\78543394-1f67-436f-9dd7-ecec6406689e.jpg" />) to its target position. In turn the distance of RDD’s can also be found.</p><p>Theorem 3. The number of cycles on track <img src="7-6801081\380dfe17-815b-4250-a835-232e81708c55.jpg" /> (column<img src="7-6801081\7bee09dc-fb03-495d-9e2c-1ad3bbebc9e4.jpg" />) from any starting point (say<img src="7-6801081\1c0d280e-09b5-43f2-ad01-d7f7d5a0c65c.jpg" />) to its target position <img src="7-6801081\abbdab6b-462e-4d48-acd0-b26373815835.jpg" /> can be found using the equation below;</p><p><img src="7-6801081\df11f6b4-9476-4257-a2bc-8f31d26a7c4c.jpg" /></p><p>where <img src="7-6801081\0da89ab7-3fcb-4764-a125-b6f7a47c9167.jpg" /> the stride distance between moduli <img src="7-6801081\d5346678-9e4a-45cf-b77c-deaab844851b.jpg" /> and <img src="7-6801081\714e2d60-70da-4044-b3d0-2ad33c4b4b7a.jpg" /> and k = the number of cycles passing through from starting point <img src="7-6801081\55cb0a69-d2b5-482a-a938-703e67918c55.jpg" /> to the destination, <img src="7-6801081\60619263-479b-4915-b5d9-10983743873f.jpg" />on track <img src="7-6801081\b5ba93d3-eabb-44e4-8b2f-8a2fae622352.jpg" /> If<img src="7-6801081\db75fb98-c508-4d37-8fdc-339f4ce7e0e0.jpg" />, then the number of cycles are equal to the total cycles from the starting point “0” to its target position<img src="7-6801081\57fe9bbf-4073-422c-9dfd-909e47c41ca8.jpg" />.</p><p>Proof: Since <img src="7-6801081\3e03a9eb-5cf6-452c-b18c-e11d8a4ebed9.jpg" /> is the number of cycles from 0 to <img src="7-6801081\45dd188b-fb85-4509-8e20-f828697d2a90.jpg" /> with respect to module<img src="7-6801081\aafbdcbe-3978-44c7-bc52-a774bcc0c860.jpg" />, and <img src="7-6801081\b8464bc5-b8ab-41a1-8664-68241d85e976.jpg" /> is the cyclic length, thus <img src="7-6801081\8cb86593-d873-4c27-81b1-19593f2865a2.jpg" /> is the total distance from the starting point <img src="7-6801081\54ebf08d-826c-4d73-8d67-34fcf6afb6a9.jpg" /> to its target position<img src="7-6801081\bbe740be-a522-40eb-90ce-5163383100da.jpg" />. The remaining distance for <img src="7-6801081\82279328-a781-452c-a5c1-f5b2581810c2.jpg" /> on track <img src="7-6801081\292060db-bc1f-4dfa-96cd-34e8fc1e881d.jpg" /> in the <img src="7-6801081\4d9d8f02-0cef-49ec-ad22-694acd4f3c74.jpg" />th cycle must be on the same row of <img src="7-6801081\6d663893-49b7-4d89-bac6-43d4745af3f8.jpg" /> on track<img src="7-6801081\86632daa-03cc-47b4-817a-051f5953a040.jpg" />. Thus,</p><p><img src="7-6801081\199f6d59-0435-4d11-a4d6-92220ea268ce.jpg" />.</p><p>Once the RDD’s of <img src="7-6801081\96a9cdf7-ccce-4f1a-9d22-de8ce1cfb138.jpg" /> are found, the error detection and correction for moduli can be found just by comparing the calculated cycles or RDD with the original residue representation, pair-wise so that the error module can be detected.</p><p>The procedure for error detection by using CPRDD algorithm is summarized as follows.</p><p>1) Choose two most significant (largest) moduli as the referred moduli among the n moduli, say <img src="7-6801081\d7e0ec13-72de-4c4c-9b7c-49f742c8ef74.jpg" /> and<img src="7-6801081\e8782613-b389-4a18-807b-299a03043954.jpg" />.</p><p>2) Find the skip distance of a cycle</p><p><img src="7-6801081\3e6f0900-5e87-495a-9b76-0027a9bc8b67.jpg" />.</p><p>3) Find the digit difference</p><p><img src="7-6801081\2d66c993-8afd-40ba-96fc-c298bde22371.jpg" />.</p><p>4) Create the equation of</p><p><img src="7-6801081\1b3c9c78-34f0-4180-b59f-ccdea173bd81.jpg" />or</p><p><img src="7-6801081\83c30ccd-6fd1-4212-811c-3ee9bd95b6b5.jpg" />(2-2)</p><p>5) Solve for <img src="7-6801081\b983fca3-b736-4983-b8ea-85400cb8fa72.jpg" /> from Equation (2-2) as the</p><p><img src="7-6801081\75d3760c-01eb-4ab0-9d7d-f8a57c67dc78.jpg" />and <img src="7-6801081\24621cbf-2039-4425-9349-65a08977020d.jpg" /> are known. The value of <img src="7-6801081\915e1d60-0e26-4fdf-b029-e78a987afa2b.jpg" /> must be less than or equal to</p><p><img src="7-6801081\a29127ba-b463-474c-a340-301ed95adb95.jpg" />.</p><p>6) Find the corresponding <img src="7-6801081\7d4c938a-b16a-40f9-86e3-36e642d15a7d.jpg" /> distance from the starting point to<img src="7-6801081\b1f25e37-46c3-40d9-8455-e99c7dcdbd15.jpg" />.</p><p>7) Calculate <img src="7-6801081\b201855b-446a-4cc0-b459-329be7821fc8.jpg" /> from RDD<sub>1</sub>, RDD<sub>2</sub>, <img src="7-6801081\6ad87d39-46bc-4535-a22f-66dc75b113a0.jpg" />, and check the values of<img src="7-6801081\f318a44d-e8e1-4bbd-b084-752847dda7e4.jpg" />, and …. If these sets’ numbers are equal, then no error occurs; otherwise, error exists.</p><p>We take the similar numerical as example 2-1 to verify this algorithm. (CPRDD)</p><p>Example 2-2. Assume that a moduli set</p><p><img src="7-6801081\f80f8423-fc9d-45ed-9c8b-0cc44d12dff0.jpg" />and number X whose residue representation is<img src="7-6801081\8f085a0c-c75b-47f3-8443-c0dc9ab7ec79.jpg" />. If an error occurs at<img src="7-6801081\82d849b4-65c2-4362-aec6-6c4b3f3bd64a.jpg" />, the error detection can be described as follows.</p><p>Let us begin our procedures from the</p><p><img src="7-6801081\f3043e76-20ae-4788-997f-c797b4b6cef3.jpg" />. Since</p><p><img src="7-6801081\c8a59b6c-629e-4210-bc6d-944821845fc0.jpg" />and<img src="7-6801081\e685b1a7-20e5-4519-97db-4b3e222d09a3.jpg" />. Then</p><p><img src="7-6801081\890d7c55-6507-48ce-b8ff-4f0e4c66d567.jpg" />. Solve for<img src="7-6801081\270ddd1d-2c53-49d5-b731-d4615af6218a.jpg" />, and let <img src="7-6801081\87a97315-5e02-40c6-a65a-31b0279d6270.jpg" /> within legitimate range</p><p><img src="7-6801081\38e07439-3354-4733-aafd-2ef71314b02f.jpg" />, then<img src="7-6801081\70537a8f-2ff9-4bad-b774-16be2d4ed171.jpg" />.</p><p>The corresponding <img src="7-6801081\5dfbc37b-d004-4070-a3e9-9eff7b383f1b.jpg" /> primary distances for these two <img src="7-6801081\1df4250f-e5cc-4d7e-a69d-f00f0f3b1664.jpg" /> are, respectively,</p><p><img src="7-6801081\bf78ee83-1b3b-4eb4-ae95-2eb88b927da0.jpg" /></p><p>Thus, the generated results of the residue representation from <img src="7-6801081\8e36203d-b719-4a2f-b00c-8d917c6f28b4.jpg" /> and <img src="7-6801081\a1c40a71-0f3f-4cf1-959f-e9d02352b677.jpg" /> are respectively</p><p><img src="7-6801081\8117dc09-ad58-4cc7-97cc-86670382f53a.jpg" />,</p><p><img src="7-6801081\cde5008a-9aca-4e61-840d-72e51968e512.jpg" />.</p><p>Since the calculated results of X<sub>1</sub> and X<sub>2</sub> are not identical, there must be errors in one of these moduli. We cannot determine which one is erroneous. To locate the module where the error exists, at least one additional (redundant) module must be used.</p><p>The procedure for error correction by using CPRDD algorithm is essential the same as the error detection. However, two additional redundant moduli <img src="7-6801081\2c6bae89-b8b4-4ca0-8fe1-40ba4484828f.jpg" /> and <img src="7-6801081\61e210c7-2e8f-4bef-847a-7d3f6e8231d9.jpg" /> must be added for one error correction. Note that only one redundant modulus added for error detection.</p><p>1) Choose <img src="7-6801081\c24fe9de-6fa1-4b2c-805e-853581d86407.jpg" /> as a referred modulus.</p><p>2) Find <img src="7-6801081\abb082e4-982e-45aa-b0b9-f75e7852ebab.jpg" /> as the same procedures of error detection steps 2-7.</p><p>3) Examine the values of<img src="7-6801081\411d3d43-dec2-4396-b2f6-36c1a1a2b63d.jpg" />. If common value exists among, <img src="7-6801081\3b488542-76e6-414f-b7fe-47edd3efb1ec.jpg" />then no error occurs. If there is one and only one, say <img src="7-6801081\cd266b6d-f0d0-4ad6-81fe-63db07009a2b.jpg" /> that has no common value with all other<img src="7-6801081\f4ee0874-ac49-4ae0-8141-dbb7731615bf.jpg" />, then an error exits in modulus<img src="7-6801081\d9f977fe-1107-4d3b-afe7-a212c0d4c2e1.jpg" />. This completes the error correction procedures.</p><p>The following example is illustrated here to verify this algorithm.</p><p>Example 2-3. Error correction As before we can further locate and correct a single error by adding two redundant moduli, <img src="7-6801081\bf591ddf-8c1d-4bc8-b4f0-fabb725f58ee.jpg" />and<img src="7-6801081\612474e7-0240-4aad-bc70-6b3dc935b824.jpg" />. Let us use the same example. The moduli set</p><p><img src="7-6801081\2eeb7c8b-cc87-4e4d-9dfd-e500d627a044.jpg" />, where <img src="7-6801081\2ac9a6c9-0ed9-4a00-a241-871ee9cfd895.jpg" /> and <img src="7-6801081\24df5cf1-e70c-4140-b303-bef5b7825452.jpg" /> are redundant moduli <img src="7-6801081\6a6e603e-fc71-4c7a-b7cc-f58192cfa175.jpg" /> and<img src="7-6801081\d0693e45-474c-48ac-8443-613a42fbd7ba.jpg" />, and the residue X representation,</p><p><img src="7-6801081\47f3ddcc-1b18-44fb-8830-7987ca320f25.jpg" />. If a single error occurs at<img src="7-6801081\eaff77de-8d6f-4dd6-ab89-56db2df6c284.jpg" />, e.g.<img src="7-6801081\358ac22f-0d9c-4152-afbf-12e16360ec8a.jpg" />, and <img src="7-6801081\a3ed4e00-a8a7-4937-8a9d-2076b55027a5.jpg" /> is assigned as a reference module, then<img src="7-6801081\f2034553-cadd-4f3b-b163-e8d03fed37d0.jpg" />, <img src="7-6801081\8f7a9d51-b8f5-4c91-aac5-120b2c925a31.jpg" />, <img src="7-6801081\c49a1a41-d399-4a83-b8e1-172dca97551f.jpg" />,and</p><p><img src="7-6801081\d1c0170e-ad6a-4f22-88ea-5380cd1ea2fa.jpg" />. From CPRDD algorithm, we can find the number of cycles for these RDD’s.</p><p><img src="7-6801081\92170899-43b4-462f-844e-a28a17a5f0f6.jpg" />,</p><p><img src="7-6801081\c9fbf22e-2855-46a7-83d9-e66d736fec3d.jpg" />,</p><p><img src="7-6801081\4bf643f8-eb6c-4e09-8d1b-ce1bdf14359e.jpg" />,</p><p><img src="7-6801081\c3bf6930-3985-4a71-b01d-a13be99565be.jpg" /></p><p>Since the cycle length is 9, all above <img src="7-6801081\6c4509ff-135b-49f2-afc3-0fff7b0d1a21.jpg" /> values must be less than<img src="7-6801081\b9104667-c529-4f50-868a-c8f5d8ddeeb1.jpg" />. Thus we have</p><p><img src="7-6801081\b4272ca0-da6a-4e8b-8b7e-c4e82e2552f9.jpg" /></p><p><img src="7-6801081\89469892-eb18-44c3-b6df-a5f513d70a33.jpg" /></p><p><img src="7-6801081\bceecbc5-c931-4d20-8085-b4081cf1142d.jpg" />.</p><p><img src="7-6801081\ad098e7d-8e59-4220-96c7-c499dcbbc199.jpg" /></p><p>If no errors occur, all k<sub>ij</sub>’s are equal, i.e.,</p><p><img src="7-6801081\c21c3217-9977-4774-a222-0b5c108a1b09.jpg" />.</p><p>Compared to the above results with pairwise moduli, only <img src="7-6801081\40c2c0c7-abda-440a-98fd-f2bdb06f4784.jpg" /> meets this condition. There exists no such value in<img src="7-6801081\d9ba75b8-4bf0-4922-9348-63a5234fbc59.jpg" />.</p><p>This shows that the module <img src="7-6801081\0ebfd8e3-3b0c-4206-9613-1f02e5f48632.jpg" /> is faulty, therefore we can correct it as follows: since<img src="7-6801081\b15b9307-e9a8-47c9-a7ab-33e7e4463b04.jpg" />, the<img src="7-6801081\56ddfd41-1a72-4b62-8004-3b786278d173.jpg" />.</p><p>Thus <img src="7-6801081\af787c4b-fba0-4152-b06f-e95c731eedca.jpg" /><img src="7-6801081\48359a0f-23b8-4f7d-baee-6ab3e1042a4e.jpg" /><img src="7-6801081\c5139117-d9b1-4e91-a544-cf78078df710.jpg" /></p><p><img src="7-6801081\77ed3856-4eba-4a47-a451-760d0f96c205.jpg" />.</p><p>This completes the error correction.</p><p>Note that the above CPRDD’s for each residue-digit difference, <img src="7-6801081\c367583e-9c99-419b-917e-dd45d3365c61.jpg" />, and <img src="7-6801081\9539a8b2-5ac8-449c-afc5-c093f94b53c0.jpg" /> can be processed in parallel. In addition, if the referenced module is assigned to the erroneous module by chance, e.g., <img src="7-6801081\52821058-4ea4-49c7-8e81-17aa07c589ad.jpg" />this algorithm will fail to locate the error. In this case, there are no <img src="7-6801081\182aea48-65bf-49d2-b913-3e8a46b67351.jpg" /> values that can be found to match this condition. The way to solve the problem is, of course, to assign any other moduli, e.g., <img src="7-6801081\59aa6e96-d34e-408b-8b71-8aee6b88130a.jpg" />or<img src="7-6801081\737ae47e-9864-4b8d-8e96-fd494d9d580c.jpg" />.</p><p>The hardware design for the proposed algorithm in Example 2-3 is shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>.</p></sec><sec id="s3"><title>3. The Target Race Distance (TRD) Scheme</title><p>The conversion or decoding technique from residue representation to X in binary is usually accomplished using the mixed-radix digit (MRD) or Chinese remained theorem (CRT). An optimal matched and parallel converter of this kind can be seen in [<xref ref-type="bibr" rid="scirp.38683-ref13">13</xref>]. The MRD is shown by the following expression with weighted numbers:</p><p><img src="7-6801081\75a1b018-e793-40df-a9b4-4fab58587a58.jpg" /></p><p>where<img src="7-6801081\597219c4-60d5-4658-9ee4-938bbcc5efc7.jpg" />, and <img src="7-6801081\fd789fad-8104-4cdd-afa2-f6ead62ea7e8.jpg" /> is the mixed-radix conversion (MRC) of x.</p><p>Optimization can be obtained using this method, as the accessed table lookup time is exactly equal to the right addition time, after immediate column stage for the tree network of the adders.</p><p>However, time is still consumed reading a large number of lookup tables. Additional hardware complexity is required by the adder-tree networks. An algorithm called the target race distance was with a simpler structure was developed for high-speed conversion.</p><p>TRD algorithm Suppose each residue number in the <img src="7-6801081\cfad35d0-e7a6-4cae-90b1-6bbc67d9d9ce.jpg" /> has its own track<img src="7-6801081\2962bd05-54f1-45b6-bfbf-36f42134d799.jpg" />, and the distance over track <img src="7-6801081\d06ad110-88bd-46ce-9406-228f258b62e1.jpg" /><sub> </sub>from 0 (starting point) to <img src="7-6801081\35373814-1a91-452d-89e1-7d436892bfec.jpg" /> (end point) through <img src="7-6801081\8d73cd94-0acb-4818-a9c5-e3bb5924e6e5.jpg" /> cycles can be expressed using</p><p><img src="7-6801081\bf4942b3-ae54-499c-8512-37ff7639a668.jpg" />.</p><p>Obviously, the primary (no multiples of m<sub>i</sub>) distance of <img src="7-6801081\cfbbd93f-b4c3-4ced-bd49-35ac0fef05d3.jpg" /> is<img src="7-6801081\ee2c9ad8-4277-4def-9c21-29d34fbb7ff0.jpg" />. To obtain the X from its residue representation of<img src="7-6801081\32a99e03-0758-44e2-ad4e-3992e63af0f7.jpg" />, we must find a target such that<img src="7-6801081\957bc0a0-1f65-421f-b58e-fb6b3e6a8fb6.jpg" /> traversing the same distances over tracks <img src="7-6801081\3c1ed2fa-031b-4bd1-b0df-9d86b6c7096a.jpg" /> respectively, i.e. when the TRD distance of each target <img src="7-6801081\f737131a-90be-4689-b69c-a047bb9437e1.jpg" /> is reached, then <img src="7-6801081\8860532b-e699-4358-86f5-ca2f591d2517.jpg" /> The TRD distance of X can be found from the following theorem:</p><p>Theorem 4. Consider the simple case of two moduli sets<img src="7-6801081\37b9a62a-eae5-4dc1-ae21-8b2cd4c1ed2e.jpg" />. Its residue representation and targets are x<sub>1</sub> and x<sub>2</sub> respectively. Let <img src="7-6801081\01505bac-6e46-4396-a36f-8f13b44ee2c0.jpg" /> be the primary distance of residue x<sub>1</sub> from 0 to x<sub>1</sub> on the track<img src="7-6801081\afcfce53-6450-41cc-91b7-39f6a472d194.jpg" />, and <img src="7-6801081\63d5e8f5-33b5-4d33-bd3b-0b0044b084df.jpg" /> be the primary distance of x<sub>2 </sub>from 0 to x<sub>2</sub> on track<img src="7-6801081\2b76e9c2-03fa-473f-a014-eb45d77adf6d.jpg" />. Then the TRD distance for these two residues x<sub>1</sub> and x<sub>2</sub> that have the same TRD distances can be obtained by the following equation.</p><disp-formula id="scirp.38683-formula135129"><label>(3-1)</label><graphic position="anchor" xlink:href="7-6801081\2a53b6f0-50b0-4b12-b18f-5ecee1e21660.jpg"  xlink:type="simple"/></disp-formula><p>In addition, k<sub>1</sub> can be calculated from the equation</p><p><img src="7-6801081\2dc0868e-10f8-49b8-8a1b-a303b5289195.jpg" /></p><p>where m<sub>1</sub> is the cyclic length of x<sub>1</sub>, and k<sub>1</sub> is number of cycles, all of the integers,</p><p><img src="7-6801081\75248a6a-27e6-48a5-be2a-7b336cff208a.jpg" />.</p><p>Proof: It is easy to show that the above <img src="7-6801081\d600dc52-4496-4674-a7d2-37ea501357b6.jpg" /> is the common target distance of x<sub>1</sub> and x<sub>2</sub>, Since</p><p><img src="7-6801081\e9d856cd-7062-405c-a379-3e41775135e9.jpg" /></p><p>And<img src="7-6801081\077c7554-c7e8-4c9a-bab1-3128ece59140.jpg" />thus <img src="7-6801081\14b54227-e205-4427-b750-2004900ecf84.jpg" /> is the TRD distances for both of x<sub>1</sub> and x<sub>2</sub>.</p><p>Corollary: It is evident that the above theorem can be extended to n moduli set <img src="7-6801081\92ba4270-fd99-48c8-9b33-00fb4d37c574.jpg" /> and residue number<img src="7-6801081\0c899ff7-72a4-4bb7-96be-5e6367bcf67b.jpg" />. The corresponding TRD of <img src="7-6801081\32d0e1fa-3b3b-4aa4-a2a6-5ba0ca0425f4.jpg" /> are therefore</p><p><img src="7-6801081\c15c84c8-d3f1-4fa6-a5d0-ebbee6cdcd94.jpg" /></p><p>In addition, k<sub>i</sub> can be solved from the following equations.</p><p><img src="7-6801081\6b670095-77a4-42bb-bd88-30aaf60ec5be.jpg" /></p><p>…</p><p><img src="7-6801081\11722bc7-7e30-449b-8d09-8c7f396d3925.jpg" /></p><p>where <img src="7-6801081\c753a8fc-cfde-4fc4-beff-c368bece437e.jpg" /></p><p>Note that <img src="7-6801081\81affa09-db56-4f68-b367-e539b4bf6eb4.jpg" /> are the targets of moduli</p><p><img src="7-6801081\9c4ee210-2121-4095-ad1e-4e60d6d2ab23.jpg" />respectively and the <img src="7-6801081\3546d8b8-87bf-4a64-b5df-d6756b01ecbe.jpg" /> is the distance that has equal track lengths, i.e.</p><p><img src="7-6801081\b636722b-a1f8-43be-8b49-c3bcd22cf93f.jpg" />. That is;</p><p><img src="7-6801081\360f12d9-5365-4f41-bfd1-1e6eda648f9f.jpg" />.</p><p>Example 3-1 Let the moduli set be</p><p><img src="7-6801081\dd06242f-afb1-4738-939b-43c12eb26e0e.jpg" />and the residue representation be<img src="7-6801081\94f73bfb-bb0e-4087-8744-f91fbd455aba.jpg" />. The procedures to find the TRD distance can be described as follows:</p><p>1) Find the primary distance <img src="7-6801081\11755739-46b2-4460-a0de-6ee927a3c71b.jpg" /> of residue</p><p><img src="7-6801081\5e3d4f93-9034-40c4-a029-0eebe9a8adc1.jpg" />since <img src="7-6801081\ef5d8d33-ab51-4ea7-82e2-a27fd091ea97.jpg" /> and <img src="7-6801081\8a3cfb99-5117-48c8-84f4-6eefbf272144.jpg" /></p><p>is required , thus<img src="7-6801081\17032388-cebc-46ed-9598-896bea2b5054.jpg" />, and</p><p><img src="7-6801081\ef5c023a-8232-485c-a256-3c5c2116a771.jpg" /></p><p>2) Repeat the procedure 1 to find the number of cycles k<sub>2</sub> and k<sub>3</sub> and the last TRD distances (destinations),</p><p><img src="7-6801081\c5936d22-406f-4fd7-af6a-2b602c86502c.jpg" />and<img src="7-6801081\9a7c26aa-12ea-458b-bf9e-2de272a46e1e.jpg" />.</p><p>Since <img src="7-6801081\774231eb-5f45-40be-8dd1-b822dcac66ab.jpg" /></p><p><img src="7-6801081\8cfb0d3b-913a-47f4-9165-bd86d63f1163.jpg" /></p><p><img src="7-6801081\2d03d198-15ee-40f6-8303-4f938be3348c.jpg" /></p><p><img src="7-6801081\78f68da6-6b71-4601-8bd7-c2380761c00c.jpg" /></p><p>thus <img src="7-6801081\817e374f-c60c-404c-af0e-aea1554801c4.jpg" /></p><p>and <img src="7-6801081\7707f431-77d6-4f21-8bf2-a027db3efc8e.jpg" /></p><p><img src="7-6801081\6973b86e-e2a8-465f-a2ff-159b28db05d6.jpg" /></p><p><img src="7-6801081\f0b812d9-8a9f-4251-a0b7-d1046398807c.jpg" /></p><p><img src="7-6801081\afb1ee1e-ca85-4167-bee7-e5cab8125064.jpg" /></p><p>thus <img src="7-6801081\d04951a8-8257-4400-b16f-1907b18a85ff.jpg" /></p><p>and <img src="7-6801081\9961bb25-45e1-43e7-a196-6f815c78241d.jpg" /></p><p>The final TRD distance is the common distinction of this system for targets <img src="7-6801081\39657a0d-b3e6-4da1-a2e0-3d0d2e4e70f8.jpg" /> and <img src="7-6801081\0ca39425-79f0-47a7-818e-43587ba453d7.jpg" /> i.e.</p><p><img src="7-6801081\98694030-fe1e-4b2f-96d9-39f1d51103e3.jpg" />. This result can be verified as follows:</p><p><img src="7-6801081\9e9c5a80-4b1b-492b-a7b3-381b6a2cfacd.jpg" />,<img src="7-6801081\045fd15b-3950-4c9c-b12e-d62b014449d6.jpg" /> ,<img src="7-6801081\bb1df8d5-9b2d-4508-b623-a5a9d2ffa01a.jpg" /> and <img src="7-6801081\b2495ba5-6155-4379-b3ce-6a38f85a6b03.jpg" /></p><p><xref ref-type="fig" rid="fig2">Figure 2</xref> Shows the TRD’s on tracks <img src="7-6801081\eb2c267a-8288-4f13-b0ab-7d8e8206e3df.jpg" /> and <img src="7-6801081\7c468d43-6dea-4b5d-ab9a-83b98b33c821.jpg" /> respectively.</p><p>Error detection and correction by TRD algorithm A redundant residue number system with <img src="7-6801081\c321dd1c-3806-455f-9bae-1d78d5c61651.jpg" /> redundant moduli will allow detection of any single error [4,14]. Consider the moduli set</p><p><img src="7-6801081\eded5c81-a3bd-47f9-890e-9745376cf9ed.jpg" />and the correct residue representation<img src="7-6801081\e7a16016-efa8-4de8-98cf-927ce17607b5.jpg" />. Let us</p><p>assume that <img src="7-6801081\e16f9e2a-200f-4b55-9a1c-f3a6523def97.jpg" /> is the redundant moduli with a single error <img src="7-6801081\91948018-143e-4da8-ba86-0361cfbf472d.jpg" /> residue representation. The TRD theorem can be used to detect this error. We find that final TRD for <img src="7-6801081\b7f959a0-da18-4f2e-bdc9-003a1f94cb85.jpg" /> and <img src="7-6801081\4a5f339b-ea2c-4579-a4a5-829f89ce00a1.jpg" /> does not fall into the legitimate range as follows i.e.</p><p><img src="7-6801081\5293fff1-acdf-4cbb-aa48-431ac1a78be6.jpg" /></p><p><img src="7-6801081\2c920bb5-e116-4ee2-aa57-2ab65f549aa6.jpg" /></p><p>The final TRD distance</p><p><img src="7-6801081\80272bdd-8430-4dd6-983e-6d5438256da2.jpg" />. If we need to locate and correct this module error, another redundant module must be added. Let us assume that <img src="7-6801081\280c6e06-6c6e-4291-bf5b-cdb6c5ef7c78.jpg" /> for this requirement in the above residue representation.</p><p>The current redundant moduli set is</p><p><img src="7-6801081\97aea798-ab3f-43df-91fc-818d225cdca7.jpg" />and the correct residue representation is</p><p><img src="7-6801081\7ff88e7e-62b2-4d16-b586-0bb0522e1f36.jpg" />. Let us assume that <img src="7-6801081\8f163c8c-c29e-493e-9d93-01f1e8b27946.jpg" /> and <img src="7-6801081\20d35ea4-e37d-48be-af2c-bf958e6d9bcc.jpg" /> are the redundant moduli. With a single error</p><p><img src="7-6801081\4d89870f-1f17-4057-8db0-472aeb6849b0.jpg" />. The TRD theorem can again be used to locate and correct this error. We find that final TRD’s for <img src="7-6801081\b7fcb4bf-5e5f-437f-b291-c05d22345863.jpg" /> dose not fall in the legitimate range, but other final TRD’s for <img src="7-6801081\7e2f026e-d2ee-4005-ba6c-24d3458ef7a7.jpg" /> do, falls in the legitimate range:</p><p>1) TRD for <img src="7-6801081\22584cd0-6548-48a8-800d-e96beeaa40c4.jpg" /> and <img src="7-6801081\a5ff6451-7d92-4421-9ba5-8863c90b3355.jpg" /></p><p><img src="7-6801081\e5aa2df1-1db7-4555-b2d6-e5216463cef2.jpg" /></p><p>2) TRD for <img src="7-6801081\fb1bbd5a-1841-4060-9c89-f39c9a00fa4d.jpg" /> and <img src="7-6801081\eb923c34-a23c-448a-b9f3-f8ad84bc3cd6.jpg" /></p><p><img src="7-6801081\8de5da0e-2b12-4733-baab-d6e03000dc07.jpg" /></p><p><img src="7-6801081\5a12f309-5b19-4692-b65b-a746936c0b3f.jpg" /></p><p>Thus, the error is located at module m<sub>2</sub> and must be corrected to<img src="7-6801081\b6b9a765-2e19-4715-8e5d-a660335e1f76.jpg" />.This algorithm can also be used for multiple error corrections. However, at least three redundant moduli are required. The procedures are similar.</p></sec><sec id="s4"><title>4. Scaling with Error Correction</title><p>The above proposed algorithm used for error detection and correction has the advantage of not requiring lookup tables. No CRT (Chinese residue theorem) decoding processes are required. However, it is still time consuming and requires extensive hardware complexity for each module having multiple-value inputs to the match unit and selecting a correct one as a output. To improve this drawback, an optimal matching algorithm is proposed here for the error correction. The following two theorems will be used and an example follows.</p><p>Theorem 5. Let m<sub>1</sub> and m<sub>2</sub> be two relative prime numbers in RNS for module 1 and module 2 respectively. Then there must exist the relation represented by the equation<img src="7-6801081\7b01b976-ab03-4372-bc52-318900ef90de.jpg" />, where</p><p><img src="7-6801081\ff01f93a-ccd2-428e-80ad-19f7b6edf01c.jpg" />so that<img src="7-6801081\614c20e1-1265-4996-ae2c-4438fcb399d3.jpg" />, assuming<img src="7-6801081\14dcf1ee-c4eb-429d-b529-b57e384cc368.jpg" />. The <img src="7-6801081\b8b0de6e-c69f-423b-b2e3-15f864342a65.jpg" /> and k are restricted to integers.</p><p>Proof: As a first step, let<img src="7-6801081\8873f7de-db74-4c3b-907b-bfbf222dd16b.jpg" />. It is easily seen that <img src="7-6801081\3aba723b-4cfa-4701-8fa4-1c0765323ae9.jpg" /> and <img src="7-6801081\fdfb905d-984d-4f15-abc0-4b04966beea0.jpg" /> will be satisfied. Next consider<img src="7-6801081\583cdd82-134f-48be-9eeb-55436e0fc2c5.jpg" />. Since there are two different pair combination</p><p><img src="7-6801081\a1d82e87-4a49-477c-948f-b56f65dddf73.jpg" />and<img src="7-6801081\cf2ae97d-f120-4bb3-9d19-b8b9a9555dc5.jpg" />, thus the difference between <img src="7-6801081\c9b18e6d-14b5-4aab-a527-83ddc9ddc818.jpg" /> and <img src="7-6801081\9e691abb-e4c9-41e9-90f3-9f0e63ca9784.jpg" /> of k will always be satisfied for<img src="7-6801081\ba651a41-92b2-4696-ba51-df2f786f3706.jpg" />, where k is restricted in integers.</p><p>Theorem 6. If the values of m<sub>1</sub> and m<sub>2</sub> and k in the equation <img src="7-6801081\0aac905d-713f-4e2a-8b59-b1345c0f9ac4.jpg" /> are known, then p<sub>1</sub></p><p>and p<sub>2</sub> can always be determined from equation</p><p><img src="7-6801081\9fc2172d-1d9b-4092-86d6-a17369e3186e.jpg" />or<img src="7-6801081\74512471-8e68-403e-83c0-9595ad4c190d.jpg" />, where p<sub>1</sub>p<sub>2</sub> and k are within the range: <img src="7-6801081\546f13b5-3ac5-4217-83db-7ab34e9a4413.jpg" /></p><p>Proof: Let the difference value of <img src="7-6801081\6a02d0d8-8dac-4309-bcb2-aaee465b9463.jpg" /> be equal to d, then d will be the integers within the range between 0 and m<sub>2</sub>, i.e., <img src="7-6801081\b75a5a82-7f7a-41c1-ba29-ac012963c74a.jpg" />, or</p><p><img src="7-6801081\1543ff3c-f20e-42e6-83a7-921855f069be.jpg" />. These two expressions show that we can always select an integer value p, within the interval between 0 and <img src="7-6801081\57de46f7-5de4-4d29-a9c5-a3f3fac14a0b.jpg" /> or <img src="7-6801081\b973bf86-7ac9-464b-90de-c244944ed9ed.jpg" /> to satisfy the conditions <img src="7-6801081\efce0fae-4b44-4cdf-9282-d06e10aeedc6.jpg" /> or <img src="7-6801081\883ec0bc-b91f-4dcb-af46-8f7641bbea66.jpg" /></p><p>Example 4-1 Let<img src="7-6801081\deb03781-b417-46d0-bef3-9d3ed4498c76.jpg" />, and<img src="7-6801081\e9c984d9-1754-4901-b3f6-6a3a0fb66154.jpg" />. Find the minimum values of p<sub>1</sub> and p<sub>2</sub> respectively from the following equation :</p><p><img src="7-6801081\4ebd6bc6-68a3-4ec4-aa1c-3e50db54aa9b.jpg" /></p><p>Since <img src="7-6801081\ede01b02-076a-4d68-8ece-3b5374ecbc2d.jpg" /> and<img src="7-6801081\f12aedfb-29df-484d-bd6a-3cffc0e250db.jpg" />, we have</p><p><img src="7-6801081\54c03288-c0fa-444a-92cd-b4c55b231cf5.jpg" />and</p><disp-formula id="scirp.38683-formula135130"><label>(4-1)</label><graphic position="anchor" xlink:href="7-6801081\07f4ab27-be7d-4639-8755-f84364701829.jpg"  xlink:type="simple"/></disp-formula><p>or</p><disp-formula id="scirp.38683-formula135131"><label>(4-2)</label><graphic position="anchor" xlink:href="7-6801081\6770b0a8-ef94-4341-a4c0-e43c49345a4c.jpg"  xlink:type="simple"/></disp-formula><p>from Equation (4-1)</p><p><img src="7-6801081\e3221472-0759-49ba-a437-d2e39dd58a3f.jpg" />so<img src="7-6801081\aca39798-bb55-4b82-9f54-a7e03cbe4b50.jpg" /></p><p>from Equation (4-2)</p><p><img src="7-6801081\d0308027-cb14-4cd1-9f65-aabba9505ce0.jpg" />, so<img src="7-6801081\94a8d2bb-6710-4809-b5a1-c7b10e7713a8.jpg" />.</p><p>This result can be verified by substituting</p><p><img src="7-6801081\0a0fcb69-131d-4545-a937-c5fc14a8cc11.jpg" />into the above equation. Theorem 6 is very useful as shown in the following example.</p><p>In Theorem 3 of Section III, the number of cycles on track <img src="7-6801081\5214ad7a-609a-4124-9925-820fa70f2863.jpg" /> from the starting point “0” to its target position “<img src="7-6801081\9fa1bb6e-a3de-45fb-ac61-9945778ea572.jpg" />” can be expressed by setting<img src="7-6801081\85d716df-b900-4fbf-bbc3-553abce6fcde.jpg" />, i.e.</p><disp-formula id="scirp.38683-formula135132"><label>(4-3)</label><graphic position="anchor" xlink:href="7-6801081\15b501fc-7aeb-4063-abef-dcd1a653510f.jpg"  xlink:type="simple"/></disp-formula><p>where <img src="7-6801081\f3317f25-f86b-42a3-9ae5-bc401115e48e.jpg" /> is the module i stride distance referring to module j. Similarly, the number of cycles on track <img src="7-6801081\3f8cd9d6-e0df-43fc-aa58-9f778c1b58dc.jpg" /> from the starting point ”0” to its target position “<img src="7-6801081\0906a4ce-01a4-4b76-8948-5a9028e75036.jpg" />” can be expressed by setting<img src="7-6801081\c2e27366-efcd-44c9-92f2-f1e961f419ea.jpg" />, i.e.;</p><disp-formula id="scirp.38683-formula135133"><label>(4-4)</label><graphic position="anchor" xlink:href="7-6801081\c156cb6e-b6b8-42f4-a899-2559429b8afd.jpg"  xlink:type="simple"/></disp-formula><p>Since, from theorem 3, the cyclic length of the residue digits differences reference to module m<sub>j</sub> is constant (uniform), then there must exist a condition,</p><p><img src="7-6801081\ba8fdbaf-79b1-4bfe-a569-ac69214610c0.jpg" />Eliminating the above terms from Equations (4-3) and (4-4),</p><p><img src="7-6801081\79f0ce91-2caa-4604-8bd8-43951cffddcb.jpg" /></p><p><img src="7-6801081\3e52f7cb-2d84-4e37-8cc0-46445855e1fd.jpg" /></p><p>where<img src="7-6801081\c5b1624b-0a8f-4328-a8f4-0e72b1567f67.jpg" />, <img src="7-6801081\f62c6afd-3a5e-4589-8f56-abb3e493fde2.jpg" />and</p><p><img src="7-6801081\333bd651-4fe1-496a-8ed0-5acaff34d862.jpg" /></p><p>Example 4-2 Let the moduli set <img src="7-6801081\e70e1dbf-0ded-405a-89a3-6814fa19e791.jpg" /></p><p><img src="7-6801081\0905191c-bf4f-4187-ae5c-2c88973dfffe.jpg" />, and the error</p><p><img src="7-6801081\4d6384aa-4d4b-40f9-8383-5ded08b72469.jpg" />, the error occurs at m<sub>3</sub>.</p><p>Follow the same procedures of the Example 4-1 to use this algorithm.</p><disp-formula id="scirp.38683-formula135134"><label>(4-5)</label><graphic position="anchor" xlink:href="7-6801081\ac30e8ea-f071-49a3-babb-40f2e1a62463.jpg"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.38683-formula135135"><label>(4-6)</label><graphic position="anchor" xlink:href="7-6801081\4cdcc634-d73b-408e-853f-701984f7aab9.jpg"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.38683-formula135136"><label>(4-7)</label><graphic position="anchor" xlink:href="7-6801081\fcb65157-5877-4f0b-9b35-d2c121dc33e8.jpg"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.38683-formula135137"><label>(4-8)</label><graphic position="anchor" xlink:href="7-6801081\42e7b124-d3a9-45f3-bc87-bdb23e5280f4.jpg"  xlink:type="simple"/></disp-formula><p>Eliminating <img src="7-6801081\7cd5d961-3595-4be4-8edc-2c6b0d9ff748.jpg" /> and <img src="7-6801081\b493fbd1-c5e5-4897-9e28-00b86a8bbd20.jpg" /><sub> </sub>from Equation’s (4-5) and (4-6)</p><p><img src="7-6801081\3e9588cf-78b7-4c28-bdac-1ee572b46766.jpg" />,</p><p><img src="7-6801081\bd369a51-4eaa-4f7a-bf9c-76acf95f74c7.jpg" /></p><p>solve for <img src="7-6801081\af3034a3-8304-462f-a7de-ecefde5417ce.jpg" /> from (4-5),</p><p><img src="7-6801081\ad74eecb-8b7b-41b1-bb39-2751e99ac14e.jpg" /></p><p><img src="7-6801081\a5b28569-0422-49d0-9dbb-2392513a81e9.jpg" /><img src="7-6801081\2444e828-9107-4eda-89f4-25b0575cd82a.jpg" /></p><p>or <img src="7-6801081\e71473f0-6a1d-4f15-b2fb-d6f2b4c70843.jpg" /></p><p><img src="7-6801081\a13f034c-98b2-463a-80b9-2641126a7731.jpg" /><img src="7-6801081\fc5cadfd-b41b-4be0-8b15-3cd085a592b4.jpg" />.</p><p>Check from Equation (4-5),</p><p><img src="7-6801081\b1c1f3a8-9c28-424c-a2c4-e82050281997.jpg" /><img src="7-6801081\c0b0cc96-305b-43a6-904e-e07c8fd6c9b4.jpg" /></p><p>This shows that the error occurs at module m<sub>3</sub>. From this result, we can immediately obtain<img src="7-6801081\1954da1c-478b-44c8-9029-7e7a8e062790.jpg" />. Noting that it may happen that the assigned referenced memory moduli falls coincidentally with error memory module m<sub>3</sub>. In this occurrence, we cannot find the correct (integers) values of P<sub>1</sub> and P<sub>2</sub> within the legitimate range. It seems that this algorithm can only detect error. To complete the error correction procedure, we can simply change the referenced module to any other and follow the same procedure as before. This guarantees that the proposed algorithm in Theorem 4 will also work well in this case. The hardware structure for illustrating this algorithm is shown in <xref ref-type="fig" rid="fig3">Figure 3</xref>.</p><p>The proposed TRD (target Race Distance) scheme used for error correction can be used for scaling and assigning numbers in a residue number system. A redundant residue number system (RRNS) is defined as before in an RNS with r additional moduli. The moduli</p><p><img src="7-6801081\764e2787-d26d-4e6a-8e01-ce574ad2f2bb.jpg" />, are called the nonredundant moduli, while the extra r moduli, <img src="7-6801081\b52d2b9e-b737-460a-96d9-9f4b6fccf6b1.jpg" />are the redundant moduli. The interval, <img src="7-6801081\493796a9-c594-4d2f-9be4-b7a176c2c491.jpg" />, is called the legitimate range where <img src="7-6801081\8212d743-cfdc-47f4-a046-af9c530a3d0e.jpg" /> and the interval, <img src="7-6801081\82581a47-4a0a-494e-8d59-fb45d93ce637.jpg" />, is the illegitimate range, where <img src="7-6801081\60d96b70-d5c9-427f-9192-49f9f55f7298.jpg" />is the total range. In the RRNS, the negative numbers within the dynamic range are represented as states at the upper extreme of the total range, which is part of the illegitimate range. The positive members are mapped to the interval<img src="7-6801081\c8e30a6b-5518-414a-b765-b8ff723a12c0.jpg" />, if M<sub>k</sub> is odd, or<img src="7-6801081\8c17e38b-a643-48af-ae7c-64dfa526ddc7.jpg" />, if M<sub>k</sub> is even. The negative numbers are mapped to the interval</p><p><img src="7-6801081\ef725496-1064-4f10-ae10-ddc0fa3fa77e.jpg" />if M<sub>k</sub> is odd or</p><p><img src="7-6801081\f9c59ebe-4c7e-4fa0-9b5d-123988757830.jpg" />if M<sub>k</sub> is even [<xref ref-type="bibr" rid="scirp.38683-ref14">14</xref>].</p><p>The one-to-one correspondence between the integers of the dynamic range and the states of the legitimate range in the RRNS can be established using a polarity shift. [<xref ref-type="bibr" rid="scirp.38683-ref11">11</xref>], The polarity shift is defined as below.</p><p><img src="7-6801081\a4492ad1-0333-44c7-bde8-b344e6017393.jpg" /></p><p>where <img src="7-6801081\23d02c49-17dd-45e8-a4ed-9ad8b1b3ee51.jpg" /> denotes the value X after a polarity shift and</p><p><img src="7-6801081\561d0a6c-eba9-4424-9fb1-2d6057130317.jpg" />if <img src="7-6801081\f5067065-80cd-435d-92f4-d281f52ca79b.jpg" /> is odd, so that<img src="7-6801081\c4b468ec-0f50-485f-a541-4ecc2f167a78.jpg" />a polarity shift needs to be performed prior to correcting or scaling since <img src="7-6801081\afdbb59b-ee2f-48b5-a713-4f395c47a9f3.jpg" /> belongs to the legitimate range. If a single residue digit error <img src="7-6801081\7a9e204f-1391-437d-95df-7f456292717a.jpg" /> is introduced and corresponds to modules m<sub>j</sub>, then, after a polarity shift.<img src="7-6801081\d4259a13-4211-42d0-814b-b9645444b0d7.jpg" /></p><p><img src="7-6801081\c09c5e70-8831-42da-82ed-65418e669a84.jpg" /></p><p>where <img src="7-6801081\57049cb2-1c05-47b7-8142-7f0b1adc27e0.jpg" /> is the multiplicative inverse of <img src="7-6801081\5dc244e5-de48-4775-8f56-1344e5f8d916.jpg" /> moduli m<sub>j</sub><sub> </sub>i.e. <img src="7-6801081\e749f2af-b64c-4426-95aa-ebed76f18c6b.jpg" />and <img src="7-6801081\d2ac95c7-ec88-4240-a746-7f55d97ab980.jpg" /> The <img src="7-6801081\4d7b302a-a55c-4bbb-a9f5-1392fd0d1f2d.jpg" /></p><p>denotes a single residue digit error and must fall within the illegitimate range , <img src="7-6801081\f25102ea-9c15-411d-8ee1-8bd10b42b8f1.jpg" />[<xref ref-type="bibr" rid="scirp.38683-ref11">11</xref>].</p><p>Since<img src="7-6801081\58e917c1-fcdd-471c-a023-681af00bc2ac.jpg" />, and can be represented uniquely by<img src="7-6801081\60642a62-59ef-4754-809a-c37dc90b9487.jpg" />,where <img src="7-6801081\39b792ef-3385-4a11-ade4-432005c9321d.jpg" /></p><p>are the coefficient from the Chinese Remainder Theorem</p><p>(CRT), i.e, <img src="7-6801081\96284697-023f-4266-8ab0-309c6c4dac33.jpg" />, where<img src="7-6801081\9acee5ca-f007-4850-bcef-c23ffe7f212d.jpg" />. Note that the redundant digits <img src="7-6801081\52c09c0d-3887-4b35-bd7d-2649a9db82d0.jpg" /> are zeros if no error is introduced, while at least one redundant digit is not equal to zero if a single error is introduced. Therefore, it has the same meaning that <img src="7-6801081\9d4a577c-372d-4546-9b3c-c7f92c25b172.jpg" /></p><p>or <img src="7-6801081\5c1d4a8b-a205-42a2-a7a7-7d36ffe861ff.jpg" /> is used to be the entries of the error correction.</p><p>1)<img src="7-6801081\648bf0af-b763-401e-b46f-063ecda0be14.jpg" />2) <img src="7-6801081\6c1eda03-74c1-4fc6-830b-265ac2f85743.jpg" /></p><p>Although the errors detection and correction described in section II have been simplified the processes due to no need of CRT conversion. It is still hardware complex and time consuming for the residue scaling operation. To improve this drawback, a direct residue-scaling algorithm can be used. It is flexible and direct to detect and prevent the errors. The flexibility means that the scaling factor can be arbitrary chosen any single module such as<img src="7-6801081\3557c054-2073-4925-a048-ddd4307c7b7c.jpg" />, i.e. not necessarily beginning from <img src="7-6801081\757f4cf7-f254-4ce6-a1c4-62d2565672b2.jpg" /> to<img src="7-6801081\a38da27e-5b06-4eae-b8e6-2d4a72530d8b.jpg" />. in order. The direct capability means no requirement for CRT extension processes for decoding or lookup tables. The following theorem (theorem 7) and example are clarified.</p><p>Theorem 7. If the scaling factor K is one of the module set <img src="7-6801081\4881686e-7488-4c6c-85a8-156580b45aa0.jpg" /> and the residue digits are<img src="7-6801081\847a0972-e3e6-465a-9843-ef186593fb22.jpg" />, respectively, then the residue digit <img src="7-6801081\416e2cbd-a857-427b-9de2-954de459d976.jpg" /> scaled by a factor</p><p><img src="7-6801081\22642c5c-26ca-46e0-9992-1970ae1fedc9.jpg" />can be obtained using the equation</p><p><img src="7-6801081\6dd45def-cb4f-4722-80cc-ac92ea49f4eb.jpg" /> (4-9).</p><p>Proof: It is easy to show that when<img src="7-6801081\a4141de5-b9bd-4c18-9669-a4e568479a42.jpg" />, and Equation (4-9) is divided by <img src="7-6801081\9f84bb23-bc6e-4e1e-a72a-b0a386a957bb.jpg" /> on both side, we have</p><p><img src="7-6801081\93a1d325-0b05-4f41-a7dd-3f6018d52002.jpg" /> (4-10).</p><p>Example 4-3. For convenient comparison of the proposed TRD algorithm to other schemes such as appeared in [<xref ref-type="bibr" rid="scirp.38683-ref14">14</xref>], we take the same numerical example in [<xref ref-type="bibr" rid="scirp.38683-ref11">11</xref>]. Let the moduli set<img src="7-6801081\b7bdb828-e426-43d7-8458-078ccf940e7d.jpg" /><sub>, </sub>where <img src="7-6801081\cdd05585-df94-4bb3-be0b-2cd4c8a9366c.jpg" /> are regular moduli and</p><p><img src="7-6801081\2975a8f9-a062-4a69-b6cd-c62a6d5eef9a.jpg" />are redundant moduli. Then</p><p><img src="7-6801081\c4ed5fab-3c35-4247-b365-03971ba0bf2a.jpg" />, <img src="7-6801081\ec4b5f87-2c20-4b02-9492-d1e1aea1a3f5.jpg" />,</p><p><img src="7-6801081\bc82ad5f-5762-4809-b121-7edb793ee970.jpg" />, and</p><p><img src="7-6801081\89110cbe-16cc-4549-8ee9-2d062a3d0688.jpg" />. The sufficient conditions for correcting single residue digits errors are 1)<img src="7-6801081\526a4b15-0a96-44cf-945d-06f769a63bdb.jpg" />, or 4, <img src="7-6801081\454df6f4-594b-4d3e-994b-4bf47e52488c.jpg" />, or 2,</p><p><img src="7-6801081\852bfceb-caa0-438d-9935-a98eb0c8de96.jpg" />, The maximum</p><p><img src="7-6801081\0e9540ad-7953-4ccf-8397-b3163fa62012.jpg" />, and 2) <img src="7-6801081\83dd07dc-d90d-4c08-9b23-6b1a5a3f35b9.jpg" /></p><p><img src="7-6801081\c651caa8-7003-48c1-8696-7cc5bb6f62ff.jpg" /></p><p>Thus the moduli set satisfies the necessary and sufficient conditions for correcting single errors digit. Assume <img src="7-6801081\14ead743-fb33-4521-8032-62e7a24d0534.jpg" /> and a single digit error <img src="7-6801081\25f055f9-1821-4b91-a051-88365ad8ea08.jpg" /> is introduced, then<img src="7-6801081\06d0151b-8250-47d4-9702-6c8d39d8e74c.jpg" />.</p><p>After a polarity shift, <img src="7-6801081\8ad6c5c4-e322-4b0a-817c-bae911e6d003.jpg" /></p><p>Follow the same procedures as shown in Example 4-2. CPRDD is applied for correction without the need for using a table.</p><p>1) Assign the moduli <img src="7-6801081\5f5e424a-6313-41bc-83a1-4c6b21ef893e.jpg" /> as the reference moduli, the following residue digit references and its corresponding CPRDD equations: <img src="7-6801081\2fea4b62-03ec-4913-8a46-463955e6da0a.jpg" />are obtained</p><p><img src="7-6801081\a35aca14-a923-4fe7-97d6-8035dccf4f0e.jpg" /></p><p><img src="7-6801081\f37c6940-d717-420d-bb10-3831be9bf8a9.jpg" /></p><p><img src="7-6801081\5e5e21c4-ee9e-44f5-ab3c-1487aa75407e.jpg" /></p><p><img src="7-6801081\88fec4ef-70f9-4daf-b13b-5cf0b4ac8e78.jpg" /></p><p><img src="7-6801081\55b0f1e5-5a24-4f90-9c12-41bda00041f5.jpg" /></p><p>2) Choose two highest digit difference as one pair for equal target race distance e.g.</p><p><img src="7-6801081\d4b95134-a155-4812-8827-59f41e634cce.jpg" />. Then the true primary RDD equations are</p><disp-formula id="scirp.38683-formula135138"><label>(4-11)</label><graphic position="anchor" xlink:href="7-6801081\e40d57af-f13f-4ffd-8c9e-2305d09c9a64.jpg"  xlink:type="simple"/></disp-formula><p>And <img src="7-6801081\d176e9f0-06a1-4e6b-a307-59ac0d2e7a63.jpg" />(4-12)</p><p>where <img src="7-6801081\727e9cc7-2658-4302-87b7-db7484d6c38c.jpg" /> and <img src="7-6801081\c5195573-c36f-4948-a1f2-181e66fb5eaa.jpg" /> are selected so that the two RDD are equal distances.</p><p>3) Eliminating k terms in Equation’s (4-11) and (4-12) by putting <img src="7-6801081\ac3d7725-db37-4b0c-a471-2e99a37a7b62.jpg" /></p><p><img src="7-6801081\0b27397e-b6fc-4e57-8b49-bed3d358fabf.jpg" /><img src="7-6801081\9219bb1c-4130-4a8d-999f-1d97e877c1ff.jpg" />where</p><p><img src="7-6801081\b4a5d584-aabb-40a2-b69a-0843cd7f5303.jpg" />, then<img src="7-6801081\9136046f-4533-48cd-8731-f15e387011b4.jpg" />.</p><p>4) Substituting p<sub>1</sub> and p<sub>2</sub> into equations (4-9) and (4-10) respectively, we have<img src="7-6801081\1091d9b4-24f8-488d-8095-bab3f99c942c.jpg" />, then</p><p><img src="7-6801081\95e7382c-09c3-4e6d-8391-442322ffba45.jpg" />, and<img src="7-6801081\bc77da25-e4dc-4f46-8f98-a57422cff99e.jpg" />, also,</p><p><img src="7-6801081\76cdc652-aa38-4f8e-addc-d2fa860f2ee5.jpg" />.</p><p>5) Checking other three RDD’s</p><p><img src="7-6801081\fe1518c8-e0d6-49c1-8850-d4e9d3e33f25.jpg" /></p><p><img src="7-6801081\895ca5ad-65c4-4961-a8f7-d086ecde61bc.jpg" /></p><p><img src="7-6801081\da05bcad-79a4-4474-a4fe-9c87197621e4.jpg" /></p><p>The only different module residue occurs on module number at<img src="7-6801081\5ed702cd-390e-4692-8e1a-d2ff47122969.jpg" />, i.e.,<img src="7-6801081\0b29585b-be5d-4b65-8c06-b30db6c95e3a.jpg" />. The three target distances, can be from any module residue, say, (except<img src="7-6801081\492ba54c-d776-46eb-b23c-695a6962f497.jpg" />),<img src="7-6801081\cf4603ae-b5c8-4990-9f5f-4df825543495.jpg" />.<img src="7-6801081\5273b29b-4bf7-4877-b481-ad14905efead.jpg" />.</p><p>The residue representation of X is therefore,</p><p><img src="7-6801081\005eaee8-c42d-4b62-8f26-bb5fc0a9ce16.jpg" />. If a single digit error <img src="7-6801081\eddcaadc-3194-4ada-9e22-b0b6c8482628.jpg" /> is introduced, then,<img src="7-6801081\b9b77c42-3931-4e1c-966c-2f7f00fca621.jpg" />.The corresponding error is therefore</p><p><img src="7-6801081\591542f1-f776-4cc7-abb8-1152ea90d2cc.jpg" /></p><p><img src="7-6801081\22e4dd46-cbfa-45ba-a864-9c3d1b25eb0b.jpg" /><img src="7-6801081\bbd18a4a-6c82-4259-b4c3-59821c7053c7.jpg" /></p><p>After a polarity shift,</p><p><img src="7-6801081\5a73c8a7-0ef6-49cc-bacf-8ab8e7f8a8ba.jpg" /></p><p>and the scaling factor <img src="7-6801081\b2e4a062-5354-4399-b636-7272a4b5893b.jpg" /> to <img src="7-6801081\0780cb02-27d5-4f02-b1c7-da110d3d68eb.jpg" /> is</p><p><img src="7-6801081\58b4354f-0aaa-42a3-aee8-b21cef8fc164.jpg" />. The final step must use a lookup table to obtain the result, <img src="7-6801081\88fb27a7-7701-4223-b086-da8314478546.jpg" />[<xref ref-type="bibr" rid="scirp.38683-ref13">13</xref>].</p><p>For verifying our proposed algorithm, the table of the corresponding <img src="7-6801081\4e42bab3-f9ea-4abe-b9c8-248714fa9d83.jpg" /> is not required as in [<xref ref-type="bibr" rid="scirp.38683-ref13">13</xref>]. The processes for finding and correcting a single error based on our method are described below.</p><p>1) Find the residue digit difference to a selected module, say <img src="7-6801081\448d24e8-b34e-4a2f-a695-3a83167fc81c.jpg" /> as before<img src="7-6801081\7e3300d3-f534-466a-b338-03163cb979c3.jpg" />. For verifying that our proposed algorithm detects and corrects single error without using a table, the same numerical example is used to describe the procedure as follows:</p><p><img src="7-6801081\220ce8eb-3b2b-4a99-b860-17459024632c.jpg" />,</p><p><img src="7-6801081\785cc043-029d-493d-b138-85f8a56795de.jpg" />,</p><p><img src="7-6801081\8110bbe2-9b27-4d59-8ea1-4c2d513f9d8f.jpg" /></p><p><img src="7-6801081\e43635b2-a255-4a9c-9cad-de1c8786aa21.jpg" /></p><p><img src="7-6801081\9565cb21-69a0-45e4-8ede-98327cef5903.jpg" /></p><p>Then</p><p><img src="7-6801081\a3365597-5ee4-45a8-9826-f0787dce318d.jpg" /></p><p><img src="7-6801081\a50329e2-40e4-409f-9ce4-15b8ee01e481.jpg" /></p><p><img src="7-6801081\ab92f0d8-f517-4a06-b78f-a8a15ef39511.jpg" /></p><p><img src="7-6801081\d41f9920-7b4b-4005-a4b4-4f5afa86a6fa.jpg" /></p><p><img src="7-6801081\69a66103-9ae0-4db4-a58d-a38f60c88094.jpg" /></p><p>2) Choose two highest digit differences as one pair for equal target race distances. e.g.</p><p><img src="7-6801081\75bd67d8-5a18-48ee-89d6-69014f2fff9e.jpg" />and<img src="7-6801081\0c54cf87-ad99-4b27-88bb-ef66e41914d7.jpg" />, the following two equations can be obtained:</p><disp-formula id="scirp.38683-formula135139"><label>(4-13a)</label><graphic position="anchor" xlink:href="7-6801081\5cea39f4-9550-474a-91f2-a33a035beafc.jpg"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.38683-formula135140"><label>(4-13b)</label><graphic position="anchor" xlink:href="7-6801081\ec933bc8-c624-4dc3-aace-84a6e408d8ce.jpg"  xlink:type="simple"/></disp-formula><p>3) Eliminating k terms in (4-13a) and (4-13b) by putting <img src="7-6801081\8e05ea2d-4ef8-41cf-9054-10edbbfacd5f.jpg" /></p><p><img src="7-6801081\ab4f8cb5-0c75-4259-a41a-9b219d88a252.jpg" />then <img src="7-6801081\2a257db1-1ea7-403d-8609-208412945e34.jpg" /> and<img src="7-6801081\7f5059b8-ba43-46eb-9efc-9b42cf0ee16d.jpg" />.</p><p>4) Substituting <img src="7-6801081\fbb6fd7e-d988-4907-b05d-30207220538c.jpg" /> and <img src="7-6801081\ae222e22-688b-4bba-9fd9-3c7539b90bbe.jpg" /> into Equation’s (4-13a) and (4-13b) respectively, we have<img src="7-6801081\272e5d5f-47fe-4c37-be4b-92af9b60e9af.jpg" />, then<img src="7-6801081\bb672614-b82b-45a5-8833-01720258b44e.jpg" />, and<img src="7-6801081\f3125359-1411-4b0f-8e30-95750f486998.jpg" />, also,</p><p><img src="7-6801081\3f3a70ec-47ad-45d1-9faf-4123317f9e88.jpg" /></p><p>Obviously, the error is located at <img src="7-6801081\9c2074dd-4409-45db-9838-9a0bded17c39.jpg" /> thus</p><p><img src="7-6801081\ba016038-637e-4b7c-9e95-ff0b5ea82c74.jpg" />.</p><p>Furthermore, the CPRDD algorithm can be used directly and in parallel for residue scaling and error correction. Thus the process is greatly speeded up.</p><p>Example 4-4 For convenient comparison, the same numeric example as in [<xref ref-type="bibr" rid="scirp.38683-ref13">13</xref>] is illustrated here. Consider<img src="7-6801081\5882e025-39ab-49b3-976d-6fe35d9b4bad.jpg" />, and scaling factor<img src="7-6801081\82b5e6ce-a56a-444b-b6c4-77ff42cd4c1f.jpg" />. If an input</p><p><img src="7-6801081\2db3437b-d2a2-4246-bbdb-22c1a04d3c3c.jpg" />and a single residue digit error<img src="7-6801081\11497cc0-b52f-4a9d-9cf7-49281e6f2791.jpg" />, corresponding to<img src="7-6801081\824f2624-8a10-4bd8-af33-0615e6d8f05f.jpg" />Then <img src="7-6801081\76f9742c-6b78-4d2d-8596-23cf927628f1.jpg" /></p><p>After a polarity shift,</p><p><img src="7-6801081\2d6bd238-6271-41c4-b77f-a973477a7836.jpg" /></p><p>1) Dividing by <img src="7-6801081\e4c5725c-f3b6-42d2-8da1-90d975d2629c.jpg" /> after subtracting <img src="7-6801081\1b553ea7-422d-4e34-8f74-1f1de4bb6e80.jpg" /> from <img src="7-6801081\a462c33a-cb7a-4fe6-a0b8-9b9376e87613.jpg" /></p><p><img src="7-6801081\43858b87-5047-41d5-9385-ef95c8c31e8a.jpg" />, this leads<img src="7-6801081\54f3b48d-c578-41a1-9a4f-3b6efffc7ffe.jpg" />,</p><p><img src="7-6801081\65289b77-c3e4-4258-b475-e0eb118f96f3.jpg" />,</p><p><img src="7-6801081\f2471f65-2ca0-4a6e-9225-8ed8487ec76b.jpg" />,</p><p><img src="7-6801081\685f9a0b-0ff1-402a-8c98-a4339eea3a0f.jpg" />,</p><p><img src="7-6801081\dc8131b3-fd26-4fcc-ac9c-8a3ef7b280fc.jpg" />.</p><p>2) Dividing by <img src="7-6801081\8a8318d8-4925-4ae1-aeb8-ccdd83612fa3.jpg" /> after subtracting</p><p><img src="7-6801081\3ece4720-e636-4939-9d4f-7d43b0175af6.jpg" />from <img src="7-6801081\37003c8b-7835-4e04-a8a8-0eddcfe306c7.jpg" /></p><p><img src="7-6801081\a97c3a7d-b7ae-46d7-95a6-2a8cfbc272f2.jpg" /></p><p><img src="7-6801081\8b1f7a0e-d65d-4934-9499-80e15e0654a9.jpg" /></p><p><img src="7-6801081\4f2a52f2-bfdf-45cc-8510-400dad633743.jpg" /></p><p><img src="7-6801081\8d2be72c-b168-46d6-9062-cc908eb46752.jpg" /></p><p>Since from above only k<sub>3</sub> does not match with all other’s k<sub>i</sub>, i.e. <img src="7-6801081\90103f38-bd45-487e-aa08-62a547c083f3.jpg" />and<img src="7-6801081\44e744e3-edaf-4ee4-b46c-5bb355416d48.jpg" />. Therefore, there occurs an error at<img src="7-6801081\ee4613cd-4cdd-4169-a94b-6fab2a664c85.jpg" />. Once this error is detected, it is easily found and corrected from the above equations, <img src="7-6801081\35f43f8d-dfb0-4396-92fb-a0050e6dbc0c.jpg" />, which in turn</p><p><img src="7-6801081\c8487b9e-e908-44e6-a7a9-289bdbb8f89c.jpg" />and<img src="7-6801081\9ee4a3b5-3990-414a-8a21-4e7494cd07d4.jpg" />.</p><p><img src="7-6801081\369a1676-275b-4e6a-8d2c-7db8c76d552b.jpg" /></p><p><img src="7-6801081\93ccbdbe-5070-4e87-b895-71b0ae50ecb6.jpg" /></p><p><img src="7-6801081\576d0d32-5f7a-4451-990f-f84c533cff7a.jpg" /></p><p><img src="7-6801081\0c2202e2-caa1-4101-8e95-c9c3b145d82b.jpg" /></p><p>that <img src="7-6801081\7ef22315-3b70-46b4-aad2-c4d23b62ce3e.jpg" /></p><p>Divided by “2”,</p><p><img src="7-6801081\c265a822-81e9-4303-80a6-cab8dd827024.jpg" /></p><p><img src="7-6801081\54297052-2b41-424a-bce4-61a0ed3414df.jpg" /></p><p><img src="7-6801081\5169d92d-d3b8-4f97-b2c0-0f677f9ec272.jpg" /></p><p><img src="7-6801081\cdf75e4a-3004-457d-bf91-4f2939bfee68.jpg" /></p><p><img src="7-6801081\4071790e-2f5e-49e3-b190-af28ad5e59bf.jpg" /></p><p><img src="7-6801081\23421640-1a2c-4d69-ab49-140269a84e69.jpg" />.</p><p>Divided by “5”</p><p><img src="7-6801081\13442b8f-16dd-4f76-bd6a-8c8b744c0ee9.jpg" />;</p><p><img src="7-6801081\8972eabb-50c2-471f-b36e-e37120862c76.jpg" /></p><p><img src="7-6801081\e22ddbd9-a19f-46b4-8809-3f4020ab9fef.jpg" /></p><p><img src="7-6801081\764b64b8-4a0c-459d-91ad-ce5393c100fa.jpg" /></p><p><img src="7-6801081\9a0ae425-959b-4dec-be25-d87d26e356ad.jpg" />.</p><p>The hardware structure of this example for the residue scaling is shown in <xref ref-type="fig" rid="fig4">Figure 4</xref>.</p><p>Actually this algorithm can be divided by any arbitrary moduli.</p><p>Example 4-5 Divided by any arbitrary moduli, say<img src="7-6801081\a9d61076-1881-4074-9841-45f297371156.jpg" />, it must subtract <img src="7-6801081\211d49b4-6b7e-4e57-80e7-daba7e5387f8.jpg" /> from X</p><p><img src="7-6801081\6c72f6da-b16b-4ad5-b136-3077fa3f85c3.jpg" /></p><p><img src="7-6801081\633d2db2-9a7f-4bc6-b46b-2661a1888b3e.jpg" /></p><p><img src="7-6801081\f353f6da-af04-4240-b152-cbb2efe8b2bf.jpg" /></p><p><img src="7-6801081\d78fdfbe-d04a-4811-b0e0-3066496c08e2.jpg" /></p><p><img src="7-6801081\0b0c780a-cbf4-4c34-a922-88adae91d20a.jpg" /></p><p>Then</p><p><img src="7-6801081\aa1f1a6d-619a-4575-b6ab-2744e6d1b69e.jpg" /></p><p><img src="7-6801081\b8dc9ec1-fc4a-4b60-8f5b-106066806fd6.jpg" /></p><p><img src="7-6801081\d3533864-fd4c-4f5f-b64e-2f37a613304c.jpg" /></p><p><img src="7-6801081\4956da78-759a-4e5f-ad96-a046453e3fa9.jpg" /></p><p><img src="7-6801081\8eee0a62-21db-42a2-8590-b5f3a73fe1dd.jpg" /></p><p>check<img src="7-6801081\3b80440b-9005-4b27-a914-6efdb9c3ffa9.jpg" />.</p><p>This results</p><p><img src="7-6801081\7fce12d1-eb28-4c97-94bd-948bf6585ddc.jpg" /></p><p><img src="7-6801081\51a348ca-b18a-4617-9f2f-1be82393a6b2.jpg" /></p><p>It can be seen from above that</p><p><img src="7-6801081\ae38616f-20a7-4681-b3ec-2d3434546801.jpg" />which are equal each other as expected.</p><p>Example 4-6 For processing two residue scalings and error corrections in parallel, we take Example 4-4 as an illustration. Let scaling factor<img src="7-6801081\4a689531-b40e-484a-a469-00357a691582.jpg" />, i.e., the first residue scaling factor is 2 and the second one is 5 or verse versa. It is easily shown that the extended CPRDD algorithm is used and can be completed in one cycle. That is</p><p><img src="7-6801081\ff45ef9d-b63e-42df-b497-9c7629520ea3.jpg" /></p><p><img src="7-6801081\83b2d083-33b7-400f-bdd2-490d3c1e0de8.jpg" /></p><p><img src="7-6801081\83a1c2f8-0cde-43f6-a6e2-5f1d446213c9.jpg" /></p><p><img src="7-6801081\c8d1b2b9-41e5-4306-8770-83a90522ae16.jpg" /></p><p><img src="7-6801081\01a97b17-ed93-4fe5-b414-64e036d66bb3.jpg" /></p><p>The result is identical</p><p><img src="7-6801081\4ca58b46-85d7-464c-ab7e-2c75015e5ba1.jpg" />, i.e.,</p><p><img src="7-6801081\a2496e6e-764c-438f-b7e8-31a62fd4ff9b.jpg" />, and<img src="7-6801081\0500eb9f-7a30-4735-b253-0b9b65137b21.jpg" />, which are identical results as shown in Example 4-4.</p><p>Example 4-7 For error correction</p><p><img src="7-6801081\ec606736-256a-434c-afb8-37d4506409b1.jpg" /><img src="7-6801081\edc9fab1-ae2e-47c0-a7fd-f205d7c2d625.jpg" /></p><disp-formula id="scirp.38683-formula135141"><graphic  xlink:href="7-6801081\74a1bfbd-34f6-4703-8a40-a26afa22b78c.jpg"  xlink:type="simple"/></disp-formula><p><img src="7-6801081\788f6abc-5881-4411-9517-dd39cca71d7b.jpg" /></p><p><img src="7-6801081\1338c1b6-1838-4de4-ba93-c8a33ddb5fe0.jpg" /></p><p><img src="7-6801081\78cb805c-d083-431b-ae4c-d16bce405441.jpg" /></p><p><img src="7-6801081\9d952ef5-251e-462d-95b3-d97fe95b3d52.jpg" /></p><p>the correct <img src="7-6801081\be8851a6-727c-4984-96e0-68d3102734c8.jpg" /> <img src="7-6801081\f0f1547e-f58d-47ee-af56-a91131a1524f.jpg" /> <img src="7-6801081\864c3f9b-6bf7-4f94-9633-da0a0092675f.jpg" />, and</p><p><img src="7-6801081\e9887272-d7e9-4925-b581-6d3f4f62a8f9.jpg" /></p><p>This shows<img src="7-6801081\87ed89a8-f5a0-4c9c-b456-c1e1bfd3b4ee.jpg" />. Therefore the error correction is made by <img src="7-6801081\8f9a02d7-4f10-40f0-a302-fc4f7470933e.jpg" /> and</p><p><img src="7-6801081\67699c48-0df7-490c-85c8-4c09191f9424.jpg" />, which corresponds to the value in Example 4-4, in scaling factor<img src="7-6801081\916263c3-b1c3-4e98-bbb0-2983088f259e.jpg" />, (dividing by “5” part).</p><p>From above results, this checks that scaling</p><p><img src="7-6801081\2b97c5c5-8d91-40e7-abb3-072b58d86884.jpg" />which is within the accuracy of the residue scaling factor.</p><p>In a general case, <img src="7-6801081\8028737c-7e56-4968-8566-92a4a0a80fd6.jpg" />, this time we must modify the subtraction of <img src="7-6801081\063d467d-af29-4f34-bc42-0c3df67f030d.jpg" /> and <img src="7-6801081\299b4c42-0cb9-4db0-9127-9e12ae4a4750.jpg" /> from the X, before the process of the scaling. If <img src="7-6801081\af4d7ed6-76d4-42df-aac6-d0c6130fc8b5.jpg" /> is the scaling factor, then the subtraction must change to</p><p><img src="7-6801081\64272929-adf7-4545-8945-6f1b4fc9a720.jpg" />, where <img src="7-6801081\4fcd2d43-13a3-4d3e-bb64-50f02169416b.jpg" /> so that</p><p><img src="7-6801081\e73241ee-e75f-4617-b590-f3bc4b60ffe4.jpg" />or <img src="7-6801081\4530afe4-a1ae-4082-bab2-fbb02f08c6cd.jpg" /> Let us consider the following example:</p><p>Example 4-8</p><p><img src="7-6801081\4db54313-4ec3-4323-a1c0-4ed2cf8fe6c8.jpg" />of moduli set</p><p><img src="7-6801081\fbaac379-0d4a-45de-885a-500f5495dcd3.jpg" />. The scaling factor</p><p><img src="7-6801081\edac5518-23e9-430e-a26b-c98d886c9548.jpg" />. is assumed. Then, residue</p><p><img src="7-6801081\0371c827-bb03-4dba-8a57-eb10681a9586.jpg" />, and <img src="7-6801081\7df1d785-d341-4515-b018-d4d4f0d33b9d.jpg" /> can be found from</p><p><img src="7-6801081\70b1b669-da41-48b6-80c7-b2458b344bba.jpg" />.<img src="7-6801081\272b8c90-af81-44ad-9428-4ffd95645f2b.jpg" />. Thus</p><p><img src="7-6801081\752e5297-c91e-47c6-a8c0-6b74a302a551.jpg" />and<img src="7-6801081\d565b775-a357-4b6d-bb7e-a48caf9673db.jpg" />.</p><p>Alternatively, it could be from other module<img src="7-6801081\7b0c4ab4-5f55-4817-9cef-7c74276be569.jpg" />, <img src="7-6801081\46fba943-4299-4356-8ff8-6dd9e5967690.jpg" />, where</p><p><img src="7-6801081\2ba78555-899c-4c9a-8293-ff9a138007e9.jpg" />and</p><p><img src="7-6801081\180fa235-aecb-4e39-af86-9fb200fa306e.jpg" /><img src="7-6801081\a4fd295c-925c-4450-b267-1f4c4b34251b.jpg" /><img src="7-6801081\3d5a1afc-00bf-494a-977b-e5f63bd70659.jpg" />which has the same number to be subtracted.</p><p><img src="7-6801081\b3c705ec-c27b-440d-92a3-327b22614a85.jpg" /></p><p><img src="7-6801081\0bdff765-8c78-4d06-8e37-81cc0eb143e3.jpg" /></p><p><img src="7-6801081\24e93783-b51c-49a3-90ab-7c2cfb817041.jpg" /></p><p><img src="7-6801081\961b2feb-3a43-49a9-b5c9-1386239f35a5.jpg" /></p><p><img src="7-6801081\dedc476a-dc1d-4b47-8616-c9579b2a914a.jpg" /></p><p>From CPRDD algorithm, the scaling processes are performed as before, we then have the following results by scaling factor<img src="7-6801081\8c8dcea6-a324-4cd1-a58b-dc47f88579e9.jpg" />;</p><p><img src="7-6801081\37f502ec-ef96-4bc9-a869-9f8ba00d06e6.jpg" /></p><p><img src="7-6801081\73961dfe-776d-4bb3-a6dc-6d56ec2e01da.jpg" /></p><p><img src="7-6801081\6923330a-7487-4f3f-aefa-944488ae2fd7.jpg" /></p><p><img src="7-6801081\0f4265ef-fbb7-473c-a3ec-0b48948ff0c9.jpg" /></p><p><img src="7-6801081\1c6529fe-8ad8-4c01-bb47-7fcd86334470.jpg" /></p><p>Thus<img src="7-6801081\466de859-1e60-4ede-b0b1-77becbec77bb.jpg" />, which is exactly the value <img src="7-6801081\96f8adf1-ae3e-457e-b4a1-3a7ecd3dbe4f.jpg" /> and is the most closed to<img src="7-6801081\c9c135b1-61c7-471d-98cf-07869262c382.jpg" />.</p><p>This result can be checked using sequential steps as follows:</p><p>For <img src="7-6801081\77ffab0e-b53a-47cc-8110-4da392fec984.jpg" /></p><p><img src="7-6801081\50df4120-0e83-4f57-82b4-07c749c1f276.jpg" /></p><p><img src="7-6801081\c0139cba-0a86-4e68-a923-b2239dde95d7.jpg" /></p><p><img src="7-6801081\03646cab-6722-4801-8d2a-c6a514109448.jpg" /></p><p>Divided by 2:</p><p><img src="7-6801081\f882761b-bb3b-4232-98ed-e72101e7de19.jpg" /></p><p><img src="7-6801081\3bd4a0d9-3049-44fe-9c74-f8d0755d7a83.jpg" /></p><p><img src="7-6801081\031d5f19-3246-4ba9-b7ed-c917d61b56d6.jpg" /></p><p><img src="7-6801081\35219673-b085-41b3-85a8-c8b9511b23be.jpg" /></p><p><img src="7-6801081\1713ea04-2114-4999-aeb7-51fd1ea4b0af.jpg" /></p><p><img src="7-6801081\f8c25b90-de57-4b9b-910c-4eb491ee8f4d.jpg" /></p><p><img src="7-6801081\39070906-249e-44b0-b288-9572fb756c41.jpg" /></p><p><img src="7-6801081\0ba6472b-6153-4798-9c41-5fc85c51a1d1.jpg" /></p><p><img src="7-6801081\e3e01f56-ffd1-47e3-b3a5-1bcf45284173.jpg" /></p><p>30&#160;&#160;&#160;&#160; 0&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 811 Divided by 7:</p><p><img src="7-6801081\6a33ba3c-abbd-4f3e-a439-26986159b90d.jpg" /></p><p><img src="7-6801081\ec8efa2d-6949-45f7-9d8a-acbf5241af49.jpg" /></p><p><img src="7-6801081\3bd57e3e-e4f4-4db7-926d-78bac1b29999.jpg" /></p><p><img src="7-6801081\2c6a4791-4160-45b2-afcd-f573f2eb783c.jpg" /></p><p><img src="7-6801081\af0811df-33ff-4265-a369-f5fdc07e115d.jpg" /></p><p>This result of <img src="7-6801081\a9da0120-4b27-4b2c-951a-f89729eadd63.jpg" /> shows that the CPRDD algorithm has the capability of parallel processing operations in residue scaling and error corrections, i.e., any combination moduli scaling factors for Ks of moduli set {m<sub>1</sub>, m<sub>2</sub>, <img src="7-6801081\2ad706c7-8b91-45af-ae1f-e144c6615005.jpg" />, m<sub>k</sub>} can be performed simultaneously.</p></sec><sec id="s5"><title>5. Conclusions</title><p>The arithmetic operations in the residue number system for addition, subtraction, and multiplication can be speeded up by using its parallel processing properties. However, some difficult operations, such as error detection and correction, must go through conversion or decoding processes from the residue representation to the regional binary number x. This is because the decoding technique is usually accomplished using the mixed-radix digit (MRD) or Chinese Remained Theorem (CRT), which are time consuming processes requiring hardware complexity. We proposed two algorithms for scaling and error correction without the need for lookup tables or increasing the encoding process.</p><p>The Cyclic property of the Residue-Digit Difference (CPRDD) algorithm can detect and correct errors from the RNS cyclic property. Any residue moduli set has a specific cycle length, which can be obtained from the individual residue number, difference, each pair, to a reference memory module m<sub>i</sub>. Once the cyclic length is known, then the original value x is easily found, and in turn, the errors can be detected and corrected.</p><p>The TRD (Target Race Distance) algorithm combined with CPRDD is used for scaling and for error detection and correction. The scaling results and error correction can be directly performed by these two algorithms without using MRD or CRT. Thus, the decoding process is significantly reduced, and the hardware structure is greatly simplified. Several examples are illustrated and verified for these two algorithms.</p></sec><sec id="s6"><title>REFERENCES</title></sec></body><back><ref-list><title>References</title><ref id="scirp.38683-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">R. W. Watson, “Error Detection and Correction and Other Residue-Interacting Operations in a Redundant Residue Number System,” University of California, Berkeley, 1965.</mixed-citation></ref><ref id="scirp.38683-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">R. W. Watson and C. W. Hastings, “Self-Checked Computation Using Residue Arithmetic,” Proceedings of the IEEE, Vol. 54, No. 12, 1966, pp. 1920-1931. http://dx.doi.org/10.1109/PROC.1966.5275</mixed-citation></ref><ref id="scirp.38683-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">S. S. S. Yau and Y. C. Liu, “Error Correction in Redundant Residue Number Systems,” IEEE Transactions on Computers, Vol. C-22, No. 1, 1973, pp. 5-11. http://dx.doi.org/10.1109/T-C.1973.223594</mixed-citation></ref><ref id="scirp.38683-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">D. Mandelbaum, “Error Correction in Residue Arithmetic,” IEEE Transactions on Computers, Vol. C-21, No. 6, 1972, pp. 538-545.</mixed-citation></ref><ref id="scirp.38683-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">F. Barsi and P. Maestrini, “Error Correcting Properties of Redundant Residue Number Systems,” IEEE Transactions on Computers, Vol. 22, No. 3, 1973, pp. 307-315. http://dx.doi.org/10.1109/T-C.1973.223711</mixed-citation></ref><ref id="scirp.38683-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">F. Barsi and P. Maestrini, “Error Detection and Correction by Product Codes in Residue Number Systems,” IEEE Transactions on Computers, Vol. 23, No, 9, 1974, pp. 915-924. http://dx.doi.org/10.1109/T-C.1974.224055</mixed-citation></ref><ref id="scirp.38683-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">V. Ramachandran, “Single Residue Error Correction in Residue Number Systems,” IEEE Transactions on Computers, Vol. C-32, No. 5, 1983, pp. 504-507. http://dx.doi.org/10.1109/TC.1983.1676264</mixed-citation></ref><ref id="scirp.38683-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">W. K. Lenkins and E. J. Altman, “Self-Checking Properties of Residue Number Error Checkers Based on Mixed Radix Conversion,” IEEE Transactions on Circuits and Systems, Vol. 35, No. 2, 1988, pp. 159-167. http://dx.doi.org/10.1109/31.1717</mixed-citation></ref><ref id="scirp.38683-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">W. K. Lenkins, “Residue Number System Error Checking Using Expanded Projection,” Electronics Letters, Vol. 18, No. 21, 1982, pp. 927-928. http://dx.doi.org/10.1049/el:19820632</mixed-citation></ref><ref id="scirp.38683-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">W. K. Lenkins, “The Design of Error Checkers for SelfChecking Residue Number Arithmetic,” IEEE Transactions on Computers, Vol. C-32, No. 4, 1983, pp. 388-396. http://dx.doi.org/10.1109/TC.1983.1676240</mixed-citation></ref><ref id="scirp.38683-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">M. H. Etzel and W. K. Jenkins, “Redundant Residue Number Systems for Error Detection and Correction in Digital Filters,” IEEE Transactions on Acoustics Speech and Signal Processing, Vol. 28, No. 10, 1980, pp. 588-544.</mixed-citation></ref><ref id="scirp.38683-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">C. C. Su and H. Y. Lo, “An Algorithm for Scaling and Single Residue Error Correction in Residue Number Systems,” IEEE Transactions on Computers, Vol. 39, No. 8, 1990, pp.1053-1064. http://dx.doi.org/10.1109/12.57044</mixed-citation></ref><ref id="scirp.38683-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">H. Y. Lo, “An Optimal Matched and Parallel MixedRadix Converter,” Journal of Information Science and Engineering, Vol. 10, 1994, pp. 411-421.</mixed-citation></ref><ref id="scirp.38683-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">A. P. Shenoy and R. Kumaresan, “Fast Base Extension Using a Redundant Modus in RNS,” IEEE Transactions on Computers, Vol. 38, No. 2, 1989, pp. 152-161. http://dx.doi.org/10.1109/12.16508</mixed-citation></ref><ref id="scirp.38683-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">E. D. Diclaudis, G. Orlandi and F, Piazza, “A Systolic Redundant Residue Arithmetic Error Correction Circuit,” IEEE Transactions on Computers, Vol. 42, No. 4, 1993, pp. 427-433. http://dx.doi.org/10.1109/12.214689</mixed-citation></ref><ref id="scirp.38683-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">S. S. Wang and M. Y. Shau, “Single Residue Error correction Based on K-Term Mj-Projection,” IEEE Transactions on Computers, Vol. 44, No. 1, 1995, pp. 129-131. http://dx.doi.org/10.1109/12.368003</mixed-citation></ref><ref id="scirp.38683-ref17"><label>17</label><mixed-citation publication-type="other" xlink:type="simple">R. S. Katti, “A New Residue Arithmetic Error Correction Scheme,” IEEE Transactions on Computers, Vol. 45, No. 1, 1996, pp. 13-19. http://dx.doi.org/10.1109/12.481482</mixed-citation></ref></ref-list></back></article>