RU2503995C2 - Device for determining sign of modular number - Google Patents
Device for determining sign of modular number Download PDFInfo
- Publication number
- RU2503995C2 RU2503995C2 RU2011139278/08A RU2011139278A RU2503995C2 RU 2503995 C2 RU2503995 C2 RU 2503995C2 RU 2011139278/08 A RU2011139278/08 A RU 2011139278/08A RU 2011139278 A RU2011139278 A RU 2011139278A RU 2503995 C2 RU2503995 C2 RU 2503995C2
- Authority
- RU
- Russia
- Prior art keywords
- sign
- determining
- numbers
- modular
- rns
- Prior art date
Links
- 239000000126 substance Substances 0.000 abstract 1
- 238000000034 method Methods 0.000 description 9
- 238000004364 calculation method Methods 0.000 description 3
- HAXFWIACAGNFHA-UHFFFAOYSA-N aldrithiol Chemical compound C=1C=CC=NC=1SSC1=CC=CC=N1 HAXFWIACAGNFHA-UHFFFAOYSA-N 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Complex Calculations (AREA)
Abstract
Description
Изобретение относится к вычислительной технике и может быть использовано для определения знаков модулярных чисел, входящих в вычислительные устройства, функционирующие в системе остаточных классов. Известно устройство, для определения знаков числа, представленное в системе остаточных классов (А.С. № 1552181, БИ №11, 1990), состоящее из блока 1 определения номера интервала, схем 3 и 4 сравнения, элементов «или» 5 и 6. Однако данное устройство обладает следующими недостатками: низкое быстродействие и большие аппаратные затраты. Наиболее близким по технической сущности к заявленному устройству является устройство для определения знака числа, представленного в системе остаточных классов (А.С. № 1674121, БИ №32, 1991), содержащее блок определения номера интервала, схемы сравнения, группы шифрования и дешифрования, сумматор и логические элементы «или».The invention relates to computer technology and can be used to determine the signs of modular numbers included in computing devices operating in a system of residual classes. A device for determining the signs of numbers, presented in the system of residual classes (AS No. 1552181, BI No. 11, 1990), consisting of
Недостатками известного устройства являются малая скорость определения знака числа и большие аппаратные затраты.The disadvantages of the known device are the low speed of determining the sign of the number and high hardware costs.
Целью настоящего изобретения является повышение быстродействия и сокращение аппаратных затрат.The aim of the present invention is to improve performance and reduce hardware costs.
Поставленная цель достигается тем, что в известном устройстве введены просмотровые таблицы (LUT) и параллельный сумматор.This goal is achieved by the fact that in the known device introduced lookup tables (LUT) and a parallel adder.
Рассмотрим метод определения знака числа, обладающий высоким быстродействием и низкими затратами оборудования. Суть метода быстрого определения знака модулярного числа основан на использовании китайской теореме об остатках числа, которая связывает позиционное число А с его представлениями в остатках (α1, α2, …, αn), где αi наименьшие неотрицательные остатки числа по модулям p1, p2, …, pn.Consider a method for determining the sign of a number that has high speed and low equipment costs. The essence of the method for quickly determining the sign of a modular number is based on the use of the Chinese theorem on the remainders of a number, which connects the position number A with its representations in the remainders (α 1 , α 2 , ..., α n ), where α i are the smallest non-negative remainders of the number with respect to the modules p 1 , p 2 , ..., p n .
Цифры αi данного представления по выбранным модулям образуются следующим образомThe numbers α i of this representation for the selected modules are formed as follows
где
Известна Китайская теорема об остатках, которая связывает позиционное число А с его представлением в остатках (α1, α2,…,αn), где αi - наименьшие неотрицательные вычеты числа, относительно модулей системы остаточных классов p1, p2, …, pn следующим выражениемThe Chinese remainder theorem is known, which relates the positional number A to its representation in the remainders (α 1 , α 2 , ..., α n ), where α i are the smallest non-negative residues of the number, with respect to the moduli of the system of residual classes p 1 , p 2 , ... , p n by the following expression
где
Если (3) разделить на константу P, то получим приближенное значениеIf (3) is divided by a constant P, then we obtain an approximate value
где
Рассмотрим случай, когда рабочий диапазон разбит на два интервала
Известно, что при кодировании дополнительным кодом, отрицательная часть динамического диапазона находится у верхнего предела полного диапазона. Положительные числа из дополнительного диапазона отображаются на область
Это обстоятельство может привести к ошибке сравнения, так как отрицательные числа попадают в верхнюю часть полного диапазона, и все отрицательные числа будут давать ошибки, что не соответствует действительности в силу разнесения динамического диапазона.This circumstance can lead to a comparison error, since negative numbers fall at the top of the full range, and all negative numbers will give errors, which is not true due to the diversity of the dynamic range.
Для преодоления этой трудности необходимо произвести сдвиг отрицательной области путем вращения остаточного кольца в положение, указанное на рисунке 2. Пунктиром показана область, которая перенесена в начало диапазона.To overcome this difficulty, it is necessary to shift the negative region by rotating the residual ring to the position indicated in Figure 2. The dotted line shows the region that is moved to the beginning of the range.
В результате отрицательные числа будут отображены в начальной части динамического диапазона.As a result, negative numbers will be displayed in the initial part of the dynamic range.
Показанное на рисунке 2 вращение, называется сдвигом полярности и его можно осуществить путем прибавления перед сравнением модулярных чисел константы
Если
Рассмотренный метод определения такой позиционной характеристики модулярного кода, как определение знака числа, показал, в отличие от известных, простоту его вычисления, так как для его реализации не используется вычисление коэффициентов ОПСС, которое требует больших аппаратных и временных затрат. По этой причине данный метод представляет собой особую важность и является одним из лучших решений на настоящее время. Перечисленные операции являются важнейшими для машинной модулярной арифметики и их применение может дать значительные преимущества не только в таких приложениях, в которых основная доля вычислений приходится на точное умножение, возведение в степень больших чисел в сочетании со сложением и вычитанием, но и в которых довольно часто появляется необходимость сравнения и определения знака числа. Известно, что теорема кодирования Сабо гласит, что нет лучших методов определения позиционных характеристик, при которых не используется их однозначность, чем перевод чисел из СОК в ОПСС, поскольку величины числа в модулярном представлении существенным образом зависят от всех остатков числа. Однако проведенные исследования по определению приблизительных характеристик, которые решают задачу формирования конструкций сравнения, не отвечают утверждению указанной теоремы Сабо. Таким образом можно сделать вывод о том, что теорема Сабо работает только при точных методах.The considered method for determining such a positional characteristic of a modular code as determining the sign of a number showed, in contrast to the known ones, the simplicity of its calculation, since its implementation does not use the calculation of OPSS coefficients, which requires a lot of hardware and time. For this reason, this method is of particular importance and is one of the best solutions to date. These operations are essential for machine modular arithmetic and their application can provide significant advantages not only in applications where the main part of the calculations is accurate multiplication, raising to the power of large numbers in combination with addition and subtraction, but also in which it often appears the need to compare and determine the sign of the number. It is known that Szabo's coding theorem states that there are no better methods for determining positional characteristics that do not use their uniqueness than converting numbers from RNS to OPSS, since the values of a number in the modular representation substantially depend on all the remainders of the number. However, the studies conducted to determine the approximate characteristics that solve the problem of the formation of comparison structures do not meet the statement of the Szabo theorem. Thus, we can conclude that Szabo’s theorem only works with exact methods.
Для повышения эффективности обработки данных в модулярной арифметике рассмотрим приложения приблизительных методов для определения знака числа.To increase the efficiency of data processing in modular arithmetic, we consider applications of approximate methods for determining the sign of a number.
Определение знака модулярных чиселDetermination of the sign of modular numbers
Известно, что для определения знака числа используются номера интервалов, в которых расположено число, что позволяет получить оценку исследуемого числа по его величине с точностью до величины интервала. Числовой диапазон P может быть разбит на pi интервалов величинойIt is known that to determine the sign of a number, the numbers of the intervals in which the number is located are used, which makes it possible to obtain an estimate of the number under investigation by its value accurate to the size of the interval. The numerical range P can be divided into p i intervals by the value
В качестве второго машинного нуля выбирается точка числового диапазона
Если дано представление (α1, α2,…,αn), то для того чтобы установить знак числа, которое оно представляет, достаточно решить задачу о принадлежности этого числа к определенному интервалу. В случае если pi=2 достаточно решить задачу о принадлежности этого числа к первой
На рисунке 3 приведена схема устройства для определения знака модулярного числа по модулям p1, p2, …, pn.Figure 3 shows a diagram of a device for determining the sign of a modular number by modules p 1 , p 2 , ..., p n .
Устройство состоит из входных регистров 3 по модулям p1, p2, …, pn, для временного хранения разрядов СОК (каждый разряд СОК представлен двоичным кодом), просмотровых таблиц (LUT) для хранения произведения констант разрядов СОК.
Работа устройства для определения знака модулярного числа определяется следующим образом.The operation of the device for determining the sign of the modular number is determined as follows.
На входные регистры (RGi) 3 по входам 1 устройства для определения знака числа подается исходное число, представленное в системе остаточных классов A=(α1, α2,…,αn). На выходе 2 формируется знак модулярного числа. Выходы регистров являются адресными входами просмотровых таблиц (LUT) (память), в элементах которых хранятся значения
Код числа A, для которого необходимо определить интервал, что равносильно определению знака числа, поступает на входные регистры RGi в двоичном коде (каждый разряд СОК кодируется двоичным кодом). Сигналы с выходов регистров поступают на входы просмотровых таблиц LUT. В просмотровых таблицах хранятся произведения констант ki и остатков αi, то есть
Выходные сигналы просмотровых таблиц в дополнительном двоичном коде поступают на вход сумматора, в котором уже записана константа 0,5 во время начальной установки. (Дополнительный код используется для того, чтобы операцию вычитания заменить операцией сложения). Знак результата сложения определяет интервал: первый или второй, что соответственно определяет знак числа.The output signals of the lookup tables in the additional binary code are fed to the input of the adder, in which the constant 0.5 is already recorded during the initial installation. (Additional code is used to replace the subtraction operation with the addition operation). The sign of the result of addition determines the interval: the first or second, which accordingly determines the sign of the number.
Пример 4. Пусть дана система оснований p1=2, p2=3, p3=5, p4=7. Тогда P=210. Константы ki соответственно равны k1=0,5, k2≈0,3333, k3=0,6, k4≈0,5714.Example 4. Let the base system p 1 = 2, p 2 = 3, p 3 = 5, p 4 = 7 be given. Then P = 210. The constants k i are respectively equal to k 1 = 0.5, k 2 ≈0.3333, k 3 = 0.6, k 4 ≈0.5714.
Дано число A=(1, 1, 2, 0). Требуется определить знак числа A.The number A = (1, 1, 2, 0) is given. It is required to determine the sign of A.
Решение. В регистры RG1=1, RG2=1, RG3=2, RG4=0. В соответствии с этими значениями регистров (адресные входы LUT) на выходах которых формируются значения LUT1=0,5, LUT2=0,3333·1=0,3333,
Таким образом, при суммировании в знаковом разряде сумматора будет 0, что говорит о том, что число находится в первом интервале, поэтому
Определение знака осуществляется за n суммировании, где n - число оснований (модулей) СОК. Время суммирования определяется логической глубиной устройства (количество последовательно соединенных элементов) и временем суммирования сумматора. Для уменьшения времени суммирования, схему сумматора можно реализовать по принципу дерева (рекурсивного сдваивания). Кроме того реализация сумматора может быть выполнена на искусственных нейронных сетях.The sign is determined in n summation, where n is the number of bases (modules) of the RNS. The totalization time is determined by the logical depth of the device (the number of elements connected in series) and the totalization time of the adder. To reduce the summation time, the adder circuit can be implemented on the principle of a tree (recursive doubling). In addition, the implementation of the adder can be performed on artificial neural networks.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
RU2011139278/08A RU2503995C2 (en) | 2011-09-26 | 2011-09-26 | Device for determining sign of modular number |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
RU2011139278/08A RU2503995C2 (en) | 2011-09-26 | 2011-09-26 | Device for determining sign of modular number |
Publications (2)
Publication Number | Publication Date |
---|---|
RU2011139278A RU2011139278A (en) | 2013-04-10 |
RU2503995C2 true RU2503995C2 (en) | 2014-01-10 |
Family
ID=49151589
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
RU2011139278/08A RU2503995C2 (en) | 2011-09-26 | 2011-09-26 | Device for determining sign of modular number |
Country Status (1)
Country | Link |
---|---|
RU (1) | RU2503995C2 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
RU2557446C1 (en) * | 2014-07-22 | 2015-07-20 | Федеральное государственное бюджетное образовательное учреждение высшего образования "Вятский государственный университет" | Device for determination of number signs in system of remainder classes |
RU2591009C1 (en) * | 2015-03-17 | 2016-07-10 | Федеральное автономное учреждение "25 Государственный научно-исследовательский институт химмотологии Министерства обороны Российской Федерации" | Method and device for arrangement of groups of numbers in homogeneous units of digital register |
RU2747371C1 (en) * | 2020-10-22 | 2021-05-04 | федеральное государственное автономное образовательное учреждение высшего образования "Северо-Кавказский федеральный университет" | Device for determining the sign of number represented in residue number system |
RU2767450C1 (en) * | 2021-04-01 | 2022-03-17 | федеральное государственное автономное образовательное учреждение высшего образования "Северо-Кавказский федеральный университет" | Method of determining sign of number in system of residual classes |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
SU1552181A1 (en) * | 1988-07-18 | 1990-03-23 | Ставропольское высшее военное инженерное училище связи им.60-летия Великого Октября | Device for determining sign of number represented in system of residual classes |
SU1674121A1 (en) * | 1989-10-16 | 1991-08-30 | Ставропольское высшее военное инженерное училище связи им.60-летия Великого Октября | Device for determining number sign presented in system of residual classes |
RU2020756C1 (en) * | 1991-04-02 | 1994-09-30 | Червяков Николай Иванович | Device for determining position characteristic of position-independent code |
US20110231456A1 (en) * | 2010-03-17 | 2011-09-22 | Ls Industrial Systems Co., Ltd. | Apparatus and method for communicating parameter of inverter |
-
2011
- 2011-09-26 RU RU2011139278/08A patent/RU2503995C2/en not_active IP Right Cessation
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
SU1552181A1 (en) * | 1988-07-18 | 1990-03-23 | Ставропольское высшее военное инженерное училище связи им.60-летия Великого Октября | Device for determining sign of number represented in system of residual classes |
SU1674121A1 (en) * | 1989-10-16 | 1991-08-30 | Ставропольское высшее военное инженерное училище связи им.60-летия Великого Октября | Device for determining number sign presented in system of residual classes |
RU2020756C1 (en) * | 1991-04-02 | 1994-09-30 | Червяков Николай Иванович | Device for determining position characteristic of position-independent code |
US20110231456A1 (en) * | 2010-03-17 | 2011-09-22 | Ls Industrial Systems Co., Ltd. | Apparatus and method for communicating parameter of inverter |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
RU2557446C1 (en) * | 2014-07-22 | 2015-07-20 | Федеральное государственное бюджетное образовательное учреждение высшего образования "Вятский государственный университет" | Device for determination of number signs in system of remainder classes |
RU2591009C1 (en) * | 2015-03-17 | 2016-07-10 | Федеральное автономное учреждение "25 Государственный научно-исследовательский институт химмотологии Министерства обороны Российской Федерации" | Method and device for arrangement of groups of numbers in homogeneous units of digital register |
RU2747371C1 (en) * | 2020-10-22 | 2021-05-04 | федеральное государственное автономное образовательное учреждение высшего образования "Северо-Кавказский федеральный университет" | Device for determining the sign of number represented in residue number system |
RU2767450C1 (en) * | 2021-04-01 | 2022-03-17 | федеральное государственное автономное образовательное учреждение высшего образования "Северо-Кавказский федеральный университет" | Method of determining sign of number in system of residual classes |
Also Published As
Publication number | Publication date |
---|---|
RU2011139278A (en) | 2013-04-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Alaghi et al. | Fast and accurate computation using stochastic circuits | |
KR100938030B1 (en) | How to test for potential numbers for cryptographic programs | |
Holdsworth et al. | Digital logic design | |
KR20010014992A (en) | Divider and method with high radix | |
RU2503995C2 (en) | Device for determining sign of modular number | |
Kasianchuk et al. | Theory and methods of constructing of modules system of the perfect modified form of the system of residual classes | |
RU2503992C2 (en) | Device for comparing numbers presented in residue number system | |
US11003769B2 (en) | Elliptic curve point multiplication operation method and apparatus | |
Zhang | An FPGA implementation of redundant residue number system for low-cost fast speed fault-tolerant computations | |
RU2439667C1 (en) | Processor of higher functioning reliability | |
US8862647B2 (en) | Semiconductor integrated circuit and exponent calculation method | |
Tay et al. | New algorithm for signed integer comparison in four-moduli superset {2 n, 2 n− 1, 2 n+ 1, 2 n+ 1− 1} | |
Piestrak | Design of multi-residue generators using shared logic | |
RU2348965C1 (en) | Computing mechanism | |
Chervyakov et al. | Comparison of modular numbers based on the chinese remainder theorem with fractional values | |
Mitra et al. | Niblack binarization on document images: area efficient, low cost, and noise tolerant stochastic architecture | |
JP2018097864A (en) | Leading zero anticipation | |
RU2559771C2 (en) | Device for primary division of molecular numbers | |
US20190325311A1 (en) | Neural network circuit | |
Selianinau | Efficient implementation of Chinese remainder theorem in minimally redundant residue number system | |
US6317772B1 (en) | Split remainder divider | |
RU2660831C1 (en) | Converter binary code - probabilistic display | |
RU2591009C1 (en) | Method and device for arrangement of groups of numbers in homogeneous units of digital register | |
Bello et al. | A MRC Based RNS to binary converter using the moduli set {22n+ 1-1, 2n-1, 22n-1} | |
KR20050081407A (en) | Encoder of multiplier using booth algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
HE9A | Changing address for correspondence with an applicant | ||
HZ9A | Changing address for correspondence with an applicant | ||
MM4A | The patent is invalid due to non-payment of fees |
Effective date: 20160927 |