EA040463B1 - DEVICE FOR DIVISION OF NUMBERS REPRESENTED IN THE SYSTEM OF RESIDUAL CLASSES - Google Patents

DEVICE FOR DIVISION OF NUMBERS REPRESENTED IN THE SYSTEM OF RESIDUAL CLASSES Download PDF

Info

Publication number
EA040463B1
EA040463B1 EA202190998 EA040463B1 EA 040463 B1 EA040463 B1 EA 040463B1 EA 202190998 EA202190998 EA 202190998 EA 040463 B1 EA040463 B1 EA 040463B1
Authority
EA
Eurasian Patent Office
Prior art keywords
input
output
block
inputs
multiplexer
Prior art date
Application number
EA202190998
Other languages
Russian (ru)
Inventor
Михаил Григорьевич Бабенко
Виктор Андреевич Кучуков
Original Assignee
федеральное государственное автономное образовательное учреждение высшего образования "Северо-Кавказский федеральный университет"
Filing date
Publication date
Application filed by федеральное государственное автономное образовательное учреждение высшего образования "Северо-Кавказский федеральный университет" filed Critical федеральное государственное автономное образовательное учреждение высшего образования "Северо-Кавказский федеральный университет"
Publication of EA040463B1 publication Critical patent/EA040463B1/en

Links

Description

Изобретение относится к вычислительным модулярным системам и предназначено для выполнения деления чисел, представленных в системе остаточных классов (СОК).The invention relates to modular computing systems and is intended to perform the division of numbers represented in the system of residual classes (RCS).

В СОК обычное целое число представляется в виде остатков от деления на набор модулей. Арифметические операции над числами заменяются операциями над остатками. Выполнение операций происходит параллельно и без межразрядных переносов, что позволяет очень быстро реализовать сложение, вычитание и умножение. Однако операция деления является немодульной и требует разработки новых позиционных методов вычисления.In RNS, an ordinary integer is represented as the remainders of division by a set of moduli. Arithmetic operations on numbers are replaced by operations on remainders. Operations are performed in parallel and without interdigit transfers, which allows you to very quickly implement addition, subtraction and multiplication. However, the division operation is non-modular and requires the development of new positional calculation methods.

Известна нейронная сеть основного деления модулярных чисел (патент на изобретение RU № 2400813, опубликован 27.09.2010). Недостатком устройства является большой объем оборудования и невозможность работы с отрицательными числами. Известная нейронная сеть предназначена для деления модулярных чисел в случае, когда в качестве делителя используется целое положительное число, попарно простое с модулями СОК p1, p2, ..., pn, либо целое положительное число, представляющее собой произведение чисел, попарно простых с pi. Для выполнения этого условия возникает необходимость нахождения приблизительного делителя путем использования обобщенной позиционной системы счисления (ОПСС). Для нахождения приблизительного делителя необходимо дополнительное оборудование и время.Known neural network of the basic division of modular numbers (patent for invention RU No. 2400813, published 27.09.2010). The disadvantage of the device is the large amount of equipment and the inability to work with negative numbers. A well-known neural network is designed to divide modular numbers in the case when a positive integer is used as a divisor, pairwise prime with RNS modules p1, p 2 , ..., p n , or a positive integer representing the product of numbers pairwise prime with pi To fulfill this condition, it becomes necessary to find an approximate divisor by using the generalized positional number system (OPSS). Finding an approximate divisor requires additional equipment and time.

Известно устройство для основного деления модулярных чисел в формате системы остаточных классов (патент на изобретение RU № 2559772, опубликован 10.08.2015). Недостатком данного устройства является большой объем оборудования и необходимость перевода чисел из основной СОК во вспомогательную СОК.A device for the basic division of modular numbers in the format of the system of residual classes is known (patent for invention RU No. 2559772, published on 10.08.2015). The disadvantage of this device is the large amount of equipment and the need to transfer numbers from the main SOC to the auxiliary SOC.

Известно устройство для основного деления модулярных чисел (патент на изобретение RU № 2559771, опубликован 10.08.2015), содержащее входные шины делимого и делителя, которые подают делимое непосредственно, а делитель через схему умножения либо через мультиплексор на вход схемы сравнения модулярных чисел, выходы которой реализуют вычислительную модель a<b, a>b или a=b, где a - делимое, b - делитель;A device for the main division of modular numbers is known (patent for invention RU No. 2559771, published on 10.08.2015), containing input buses of the dividend and the divider, which supply the dividend directly, and the divider through the multiplication circuit or through the multiplexer to the input of the modular number comparison circuit, the outputs of which implement the computational model a<b, a>b or a=b, where a is a dividend, b is a divisor;

управляющие выходы схемы сравнения a<b, a>b соединены со схемой управления, выходы которой соединены с адресными входами мультиплексора, входами управления счетчика, регистров сдвига и хранения, сумматоров частного, делителя и вычитателя, а также с одним из входов ключей, вторые входы которых соединены с выходом памяти, входы которой соединены с регистром сдвига, а выход a=b схемы сравнения соединен со входом сумматора частного, помещая в него единицу, а информационные выходы соединены со схемами сумматоров делимого и делителя, выходы которого соединены регистром сдвига влево, выход которого соединен со счетчиком определения высшей степени аппроксимационного ряда частного;the control outputs of the comparison circuit a<b, a>b are connected to the control circuit, the outputs of which are connected to the address inputs of the multiplexer, control inputs of the counter, shift and storage registers, quotient adders, divider and subtractor, as well as to one of the key inputs, the second inputs which are connected to the output of the memory, the inputs of which are connected to the shift register, and the output a=b of the comparison circuit is connected to the input of the quotient adder, placing a unit in it, and the information outputs are connected to the adder circuits of the dividend and the divider, the outputs of which are connected by the shift register to the left, the output which is connected to the counter for determining the highest degree of the approximation series of private;

выход счетчика соединен с адресными входами памяти, выходы которой через схему ключей и запрет подают на вход сумматора частного степень члена ряда, входящего в уточненный член ряда частного, и на вход схемы умножения высшей степени ряда на делитель, выход которой через мультиплексор соединен со схемой сравнения, выходы которой соединены с сумматорами делимого и делителя;the output of the counter is connected to the address inputs of the memory, the outputs of which, through the key circuit and the prohibition, are fed to the input of the adder of the quotient by the degree of the term of the series included in the refined term of the series of the quotient, and to the input of the circuit for multiplying the highest degree of the series by the divisor, the output of which is connected through the multiplexer to the comparison circuit , the outputs of which are connected to the adders of the dividend and the divider;

выход сумматора делителя соединен со входом регистра сдвига вправо, выход которого соединен со схемой вычитателя, на второй вход которого подключен выход сумматора делимого;the output of the divider adder is connected to the right shift register input, the output of which is connected to the subtractor circuit, the second input of which is connected to the dividend adder output;

выход вычитателя соединен с регистром хранения остатка при вычитании из делимого членов ряда частного, выход которого соединен через сумматор делимого с вычитателем, выход которого соединен со схемой запрета, выходы которой соединены с регистром хранения остатка при вычитании из делимого членов ряда частного и схемой сумматора частного.the output of the subtractor is connected to the register for storing the remainder when subtracting members of the quotient from the dividend, the output of which is connected through the adder of the dividend to the subtractor, the output of which is connected to the prohibition circuit, the outputs of which are connected to the register for storing the remainder when the members of the quotient are subtracted from the dividend and the quotient adder circuit.

Недостатками данного изобретения являются ограниченные функциональные возможности, связанные с невозможностью работы с отрицательными числами.The disadvantages of this invention are limited functionality associated with the inability to work with negative numbers.

Известно устройство деления модулярных чисел (патент РФ № 2628179, опубл. 15.08.2017 г.), которое содержит вход тактового импульса, вход глобального сброса, вход делимого, вход делителя, элемент ИЛИ, блок вычисления позиционных характеристик, блок уточнения аппроксимационного ряда, блок вывода частного и выход вывода частного. При этом блок вычисления позиционных характеристик содержит регистр делимого, n инверторов делимого, n регистров хранения модуля pi, где i=1, ..., n, n регистров хранения коэффициента ki, n сумматоров делимого, n умножителей отрицательного делимого, n умножителей положительного делимого, сумматор значения F(A), сумматор значения F(-A), регистр хранения значения F(-A), регистр хранения значения F(A), регистр делителя, n инверторов делителя, n регистров хранения модуля pi, n регистров хранения коэффициента ki, n сумматоров делителя, n умножителей отрицательного делителя, n умножителей положительного делителя, сумматор значения F(B), сумматор значения F(-B), регистр хранения значения F(-B), регистр хранения значения F(B), элемент XOR, мультиплексор делимого, мультиплексор делителя, блок сравнения. Блок уточнения аппроксимационного ряда содержит регистр сдвига, счетчик, регистр хранения F(|A|), регистр хранения уменьшаемого, мультиплексор выбора уменьшаемого, инвертор, память хранения степеней 2 в СОК, сумматор, мультиплексор выбора следующего уменьшаемого, элемент НЕ, элемент И. Блок вывода частного состоит из элемента ИЛИ, элемента задержки, удерживающего регистра, n регистров хранения остатка по модулюA device for dividing modular numbers is known (RF patent No. 2628179, publ. 08/15/2017), which contains a clock input, a global reset input, a dividend input, a divider input, an OR element, a block for calculating positional characteristics, a block for refining an approximation series, a block derivation of the quotient and output of the derivation of the quotient. At the same time, the block for calculating positional characteristics contains a dividend register, n dividend inverters, n storage registers of the module pi, where i=1, ..., n, n coefficient storage registers ki, n dividend adders, n negative dividend multipliers, n positive dividend multipliers , F(A) value adder, F(-A) value adder, F(-A) value holding register, F(A) value holding register, Divider register, n divider inverters, n pi module holding registers, n coefficient holding registers ki, n divisor adders, n negative divisor multipliers, n positive divisor multipliers, F(B) value adder, F(-B) value adder, F(-B) value storage register, F(B) value storage register, XOR element , dividend multiplexer, divider multiplexer, comparison unit. The refinement block of the approximation series contains a shift register, a counter, a storage register F(|A|), a minuend storage register, a minuend selection multiplexer, an inverter, a memory for storing powers of 2 in the SOC, an adder, a next minuend selection multiplexer, a NOT element, an AND element. Block quotient output consists of an OR element, a delay element, a holding register, n modulo remainder storage registers

- 1 040463 pi, n сумматоров по модулю pi, n демультиплексоров по модулю pi, n регистров хранения суммы по модулю pi, n инверторов, n регистров хранения модуля pi, n сумматоров, n регистров хранения обратного значения суммы по модулю n мультиплексоров выбора суммы, удерживающего регистра знака, регистра хранения суммы в СОК, регистра хранения значения 1, регистра хранения значения -1, мультиплексора равенства абсолютных величин делимого и делителя, мультиплексора вывода частного, регистра хранения частного.- 1 040463 pi, n modulo pi adders, n modulo pi demultiplexers, n modulo pi sum storage registers, n inverters, n pi modulo storage registers, n adders, n modulo sum reciprocal storage registers n sum selection multiplexers, sign holding register, sum storage register in RNS, value storage register 1, value storage register -1, divisible and divisor absolute value multiplexer, quotient output multiplexer, quotient storage register.

Недостатком данного изобретения является недостаточная точность, связанная с округлением приближенных значений, что в ряде случаев приводит к ошибкам.The disadvantage of this invention is the lack of accuracy associated with the rounding of approximate values, which in some cases leads to errors.

Техническим результатом данного изобретения является повышение точности вычислений деления чисел, представленных в системе остаточных классов.The technical result of this invention is to improve the accuracy of calculations of division of numbers presented in the system of residual classes.

Технический результат достигается тем, что устройство деления чисел, представленных в системе остаточных классов, содержащее входы делимого и делителя, блок вычисления позиционных характеристик, блок уточнения аппроксимационного ряда, блок вывода частного и выход частного, при этом вход делимого и вход делителя соединены с первым и вторым входами блока вычисления позиционных характеристик;The technical result is achieved by the fact that the device for dividing the numbers presented in the system of residual classes, containing the inputs of the dividend and the divisor, the unit for calculating positional characteristics, the unit for refining the approximation series, the output unit of the quotient and the output of the quotient, while the input of the dividend and the input of the divisor are connected to the first and the second inputs of the block for calculating positional characteristics;

первый, второй и третий выходы блока вычисления позиционных характеристик соединены с первым, вторым и третьим входами блока вывода частного;the first, second and third outputs of the positional characteristics calculation unit are connected to the first, second and third inputs of the private output unit;

четвертый и шестой выходы блока вычисления позиционных характеристик соединены с первым и третьим входами блока уточнения аппроксимационного ряда, первый и второй выходы которого соединены с четвертым и пятым входами блока вывода частного, выход которого является выходом частного; и блок вычисления позиционных характеристик содержит два инвертора, четыре блока умножения на константы, четыре блока сложения, два мультиплексора, элемент XOR и блок сравнения, при этом значение делимого, представленное в СОК, с первого входа поступает на вход первого блока умножения на константы и на вход первого инвертора, выход которого подключен ко входу второго блока умножения на константы;the fourth and sixth outputs of the block for calculating positional characteristics are connected to the first and third inputs of the block for refining the approximation series, the first and second outputs of which are connected to the fourth and fifth inputs of the quotient output block, the output of which is the output of the quotient; and the block for calculating positional characteristics contains two inverters, four blocks of multiplication by constants, four blocks of addition, two multiplexers, an XOR element and a comparison block, while the value of the dividend, presented in the SOC, from the first input is fed to the input of the first block of multiplication by constants and to the input of the first inverter, the output of which is connected to the input of the second block of multiplication by constants;

выходы первого и второго блоков умножения на константы подключены ко входам первого и второго блоков сложения, выходы которых соединены с первым и третьим входами первого мультиплексора;the outputs of the first and second blocks of multiplication by constants are connected to the inputs of the first and second addition blocks, the outputs of which are connected to the first and third inputs of the first multiplexer;

значение делителя, представленное в СОК, со второго входа блока вычисления позиционных характеристик поступает на вход третьего блока умножения на константы и на вход второго инвертора, выход которого подключен ко входу четвертого блока умножения на константы;the divisor value presented in the SOC, from the second input of the block for calculating positional characteristics, is fed to the input of the third block of multiplication by constants and to the input of the second inverter, the output of which is connected to the input of the fourth block of multiplication by constants;

выходы третьего и четвертого блоков умножения на константы подключены ко входам третьего и четвертого блоков сложения, выходы которых соединены с первым и третьим входами второго мультиплексора;the outputs of the third and fourth blocks of multiplication by constants are connected to the inputs of the third and fourth addition blocks, the outputs of which are connected to the first and third inputs of the second multiplexer;

первые выходы первого и второго мультиплексоров подключены ко второму и третьему входам блока сравнения, первый и второй выходы которого являются вторым и третьим выходами блока вычисления позиционных характеристик;the first outputs of the first and second multiplexers are connected to the second and third inputs of the comparison unit, the first and second outputs of which are the second and third outputs of the unit for calculating positional characteristics;

первый выход первого мультиплексора дополнительно соединен с пятым выходом блока вычисления позиционных характеристик;the first output of the first multiplexer is additionally connected to the fifth output of the block for calculating positional characteristics;

выход элемента XOR является первым выходом блока вычисления позиционных характеристик, блок уточнения аппроксимационного ряда содержит регистр хранения уменьшаемого, блок вычитания по модулю, мультиплексор, регистр хранения степеней 2, блок отсчета степеней и элемент И, при этом выход блока вычитания по модулю соединен со вторым входом мультиплексора, выход которого соединен со вторым входом регистра хранения уменьшаемого;the output of the XOR element is the first output of the block for calculating positional characteristics, the block for refining the approximation series contains a register for storing the minuend, a block for subtracting modulo, a multiplexer, a register for storing degrees 2, a block for reading degrees and an AND element, while the output of the block for subtracting modulo is connected to the second input multiplexer, the output of which is connected to the second input of the reduced storage register;

третий выход блока отсчета степеней является первым выходом блока уточнения аппроксимационного ряда;the third output of the power reading block is the first output of the approximation series refinement block;

выход элемента И является вторым выходом блока уточнения аппроксимационного ряда;the output of the AND element is the second output of the refinement block of the approximation series;

блок вывода частного содержит блок сложения по модулю, демультиплексор, инвертор, регистр хранения 1 в СОК, регистр хранения -1 в СОК, мультиплексор частного, мультиплексор единицы и мультиплексор выбора частного, при этом первый вход блока сложения по модулю является пятым входом блока вывода частного;the quotient output block contains a modulo addition block, a demultiplexer, an inverter, a storage register 1 in the ROC, a storage register -1 in the ROC, a quotient multiplexer, a unit multiplexer, and a quotient selection multiplexer, while the first input of the modulo addition block is the fifth input of the quotient output block ;

второй вход блока сложения по модулю подключен к первому выходу демультиплексора, а выход соединен со входом демультиплексора, управляющий вход которого подключен к четвертому входу блока вывода частного, а второй выход - ко второму входу и через инвертор к первому входу мультиплексора частного, выход которого соединен с первым входом мультиплексора выбора частного, второй вход которого соединен с выходом мультиплексора единицы, первый и второй входы которого соединены с регистрами хранения 1 и -1 в СОК соответственно;the second input of the modulo addition block is connected to the first output of the demultiplexer, and the output is connected to the input of the demultiplexer, the control input of which is connected to the fourth input of the quotient output block, and the second output is connected to the second input and through the inverter to the first input of the quotient multiplexer, the output of which is connected to the first input of the private selection multiplexer, the second input of which is connected to the output of the unity multiplexer, the first and second inputs of which are connected to storage registers 1 and -1 in the SOC, respectively;

управляющие входы мультиплексора частного и мультиплексора единицы соединены с первым входом блока вывода частного;the control inputs of the private multiplexer and unity multiplexer are connected to the first input of the private output unit;

управляющий вход мультиплексора выбора частного подключен к третьему входу блока вывода частного, отличается тем, что дополнительно пятый выход блока вычисления позиционных характеристик соthe control input of the quotient selection multiplexer is connected to the third input of the quotient output block, differs in that, in addition, the fifth output of the block for calculating positional characteristics with

- 2 040463 единен со вторым входом блока уточнения аппроксимационного ряда;- 2 040463 is united with the second input of the block for refining the approximation series;

в блок вычисления позиционных характеристик введены первый и второй блоки определения знака;in the block for calculating positional characteristics, the first and second blocks for determining the sign are introduced;

в блоках умножения на константы производится умножение на ортогональные базисы СОК р Piin blocks of multiplication by constants, multiplication by orthogonal bases of RNS р Pi

Bi = Pi-\Pl~1\ , pi = Ρ/Ρί,\ρΑ\ где pi Pi - мультипликативная инверсия, p _ гр ΐι=ι Pi - рабочий диапазон СОК с модулями p1, p2, ..., pn, в блоках суммирования происходит следующее вычисление функции ядра:B i = P i -\P l ~ 1 \ , p i = Ρ/ Ρί ,\ ρΑ \ ., pn, the following calculation of the kernel function takes place in the summation blocks:

С(Х) = ΙΣ?=1 cw-*dcp, которая подбирается из условия монотонности и отсутствия критических ядер, где Cp=2n - максимальный диапазон функции ядра, а веса wi характеризует конкретную функцию ядра, при этом на выход блоков сложения подаются N младших бит суммы;C(X) = ΙΣ? =1 cw-*dc p , which is selected from the condition of monotonicity and the absence of critical kernels, where C p =2 n is the maximum range of the kernel function, and the weights wi characterize a specific kernel function, while N low bits of the sum are fed to the output of the addition blocks;

выходы первого и третьего блоков сложения дополнительно соединены со вторыми входами первого и второго блоков определения знака, первые входы которых соединены с первым и вторым входами блока вычисления позиционных характеристик, а выходы соединены с управляющими входами первого и второго мультиплексоров соответственно и с первым и вторым входами элемента XOR;the outputs of the first and third addition blocks are additionally connected to the second inputs of the first and second sign determination blocks, the first inputs of which are connected to the first and second inputs of the block for calculating positional characteristics, and the outputs are connected to the control inputs of the first and second multiplexers, respectively, and to the first and second inputs of the element XOR;

первый и второй входы блока вычисления позиционных характеристик дополнительно соединены со вторыми входами первого и второго мультиплексора, четвертые входы которых соединены с выходами первого и второго инверторов;the first and second inputs of the block for calculating positional characteristics are additionally connected to the second inputs of the first and second multiplexers, the fourth inputs of which are connected to the outputs of the first and second inverters;

вторые выходы первого и второго мультиплексоров соединены с первым и четвертым входами блока сравнения и четвертым и шестым выходами блока вычисления позиционных характеристик; и в блок уточнения аппроксимационного ряда введен регистр хранения делителя, блок умножения по модулю, демультиплексор, два блока умножения на константу, два блока сложения и блок определения знака, при этом блок отсчета степеней во время прямого отсчета вычисляет максимальную степень частного, а во время обратного отсчета последовательно передает адреса степеней 2 в порядке убывания на первый вход регистра хранения степеней 2, выход которого подключен ко второму входу блока умножения по модулю и второму входу демультиплексора, на управляющий вход которого поступает сигнал со второго выхода блока отсчета степеней, а на первый вход - сигнал с выхода блока умножения по модулю, первый вход которого соединен с выходом регистра хранения делителя, вход которого является третьим входом блока уточнения аппроксимационного ряда, первый вход которого подключен к первому входу регистра хранения уменьшаемого, а второй вход подключен к первому входу блока отсчета степеней;the second outputs of the first and second multiplexers are connected to the first and fourth inputs of the comparison unit and the fourth and sixth outputs of the positional characteristics calculation unit; and a divisor storage register, a modulo multiplication unit, a demultiplexer, two multiplication units by a constant, two addition units and a sign determination unit are introduced into the approximation series refinement unit, while the power reading unit during the direct reading calculates the maximum degree of the quotient, and during the reverse counting sequentially transmits the addresses of degrees 2 in descending order to the first input of the storage register of degrees 2, the output of which is connected to the second input of the modulo multiplication block and the second input of the demultiplexer, the control input of which receives a signal from the second output of the degrees counting block, and to the first input - a signal from the output of the modulo multiplication block, the first input of which is connected to the output of the divider storage register, the input of which is the third input of the approximation series refinement block, the first input of which is connected to the first input of the reduced storage register, and the second input is connected to the first input of the power reading block;

третий выход демультиплексора подключен ко входу первого блока умножения на константы, выход которого подключен ко входу первого блока сложения, выход которого подключен ко второму входу блока отсчета степеней;the third output of the demultiplexer is connected to the input of the first unit for multiplying by constants, the output of which is connected to the input of the first addition unit, the output of which is connected to the second input of the power reading unit;

выход регистра хранения уменьшаемого подключен к первому входу мультиплексора и первому входу блока вычитания по модулю, выход которого подключен ко входу второго блока умножения на константы и второму входу блока определения знака;the output of the reduced storage register is connected to the first input of the multiplexer and the first input of the modulo subtraction unit, the output of which is connected to the input of the second multiplication unit by constants and the second input of the sign determination unit;

выход второго блока умножения на константы подключен ко входу второго блока сложения, выход которого подключен к первому входу блока определения знака, выход которого подключен к управляющему входу мультиплексора и через инвертор к первому входу элемента И, второй вход которого соединен со вторым выходом демультиплексора, первый выход которого подключен ко второму входу блока вычитания по модулю;the output of the second block of multiplication by constants is connected to the input of the second addition block, the output of which is connected to the first input of the sign determination block, the output of which is connected to the control input of the multiplexer and through the inverter to the first input of the AND element, the second input of which is connected to the second output of the demultiplexer, the first output which is connected to the second input of the modulo subtraction block;

в блок вывода частного дополнительно введен элемент И, первый вход которого соединен с выходом мультиплексора выбора частного, а второй вход - через инвертор со вторым входом блока вывода частного; и выход элемента И является выходом частного.an additional element is added to the private output unit, the first input of which is connected to the output of the private selection multiplexer, and the second input is connected through an inverter to the second input of the private output unit; and the output of the AND element is the output of the quotient.

Сущность изобретения основана на следующем математическом аппарате. Пусть даны делимое X, делитель Y, частное Q и остаток R. Тогда R=X-Y-Q, при этом R<Y. Рассмотрим алгоритм деления, основанный на последовательном приближении частного Q степенями основания системы счисления, т.е. для двоичной системы процесс заключается в нахождении таких qi={0,1}, чтобы выполнялось равенствоThe essence of the invention is based on the following mathematical apparatus. Let the dividend X, the divisor Y, the quotient Q, and the remainder R be given. Then R=X-Y-Q, and R<Y. Consider a division algorithm based on the successive approximation of the quotient Q by the powers of the base of the number system, i.e. for a binary system, the process is to find qi={0,1} such that the equality

Q = qn-2n+ qn_l-2n-1 + - + Ч1 21 + q0 2° (1)Q \u003d q n -2 n + qn_l-2 n - 1 + - + P1 2 1 + q 0 2 ° (1)

Подставляя (1) в формулу деления, получимSubstituting (1) into the division formula, we get

R=X — Y· qn-2n-Y- qn-± · 2^1-----Y · q± · 21 - Υ · q0 · 2° (2)R=X — Y q n -2 n -Y- qn-± 2^ 1 -----Y q± 2 1 - Υ q 0 2° (2)

Таким образом процесс деления можно свести к последовательности вычитаний. Пусть 2n входит в представление частного Q, т.е. qn=1, тогда обозначим Δ1=X-2n·Y, причем Δ1>0. Подставим Δ1 в (2).Thus the process of division can be reduced to a sequence of subtractions. Let 2 n be included in the representation of the quotient Q, i.e. qn=1, then we denote Δ 1 =X-2 n ·Y, and Δ1>0. We substitute Δ1 into (2).

R^-Y- Чл_г 2-1-----Y Ч1 21 - Y q0 2°R^-Y- Member _ g 2- 1 -----Y Ch1 2 1 - Y q0 2°

Продолжим данный процесс. Обозначим Δ21-2n-1·Y. Поскольку Δi является суммой остатка от деления и оставшихся членов последовательности степеней системы счисления, умноженных на делитель,Let's continue this process. Denote Δ 21 -2 n-1 ·Y. Since Δ i is the sum of the remainder of the division and the remaining terms of the sequence of powers of the number system, multiplied by the divisor,

- 3 040463 то всегда выполняется Δi>0.- 3 040463 then Δ i >0 is always satisfied.

Если же 2к не входит в представление частного Q, т.е. qk=0, тогда Δn-k-1=Δn-k-2-2k·Y<0. И тогда необходимо проверить вхождение 2k-1, для чего находится Δn-k=Δn-k-2-2k-1·Y.If 2 k is not included in the representation of the partial Q, i.e. qk=0, then Δn-k-1=Δn-k-2-2 k Y<0. And then it is necessary to check the occurrence of 2 k-1 , for which Δn-k=Δ nk-2 -2 k-1 ·Y is found.

В системе остаточных классов любое число X<P однозначно представляется набором остатков xi от деления числа X на взаимно простые модули СОК pi, где x,^X mod pi, Πΐ=ι Pi - рабочий диапазонIn the system of residual classes, any number X<P is uniquely represented by a set of remainders x i from dividing the number X by coprime RNS modules pi, where x,^X mod pi, Πΐ=ι Pi is the operating range

СОК, ί — X τι. Восстановление числа X из СОК в позиционную систему счисления может быть произведено как в прототипе с использованием приближенной Китайской теоремы об остатках kt · Xi = It1!SOK, t - X τι. The restoration of the number X from RNS to the positional number system can be done as in the prototype using the approximate Chinese remainder theorem kt · Xi = It 1 !

где Ρι Ρί - мультипликативная инверсия.where Ρι Ρί is the multiplicative inversion.

Однако коэффициенты ki редко оказываются конечной дробью и округление приводит к накоплению ошибок.However, the coefficients ki rarely turn out to be a finite fraction, and rounding leads to an accumulation of errors.

Знак в системе остаточных классов чаще всего вводится разбиением диапазона на две части, тогда с учетом динамического диапазона P в СОК можно представить числа < X <The sign in the system of residual classes is most often introduced by dividing the range into two parts, then, taking into account the dynamic range P, it is possible to represent the numbers <X<

2 если P нечетное,2 if P is odd,

РРRR

--<Х<И--К.--<X< and --K.

2 если P четное.2 if P is even.

ТогдаThen

X - положительное, если 2 ’ если P - четное, 2 ’ если X - нечетное, v _ _ _ 7 < X < П . _ Т < X < Р, _ V . . _ X - отрицательное, если 2 ’ если P - четное, 2 если X - нечетное.X is positive if 2' if P is even, 2' if X is odd, v _ _ _ 7 < X < P . _ T < X < P, _ V . . _ X is negative if 2 ' if P is even, 2 if X is odd.

Для выполнения деления по формуле необходимо выполнение операций сравнения чисел, представленных в СОК, и определения знака.To perform division by a formula, it is necessary to perform operations of comparing the numbers presented in the RNS and determining the sign.

Поскольку СОК является непозиционной системой счисления, то для сравнения чисел и определения знака, т.е. нахождения положения числа на числовой прямой, вычисляют позиционную характеристику. Примером позиционной характеристики может служить Китайская теорема об остатках с дробями, использованная в прототипе. Другой позиционной характеристикой может быть введенная И.Я. Акушским функция ядраSince RNS is a non-positional number system, then to compare numbers and determine the sign, i.e. finding the position of the number on the number line, calculate the positional characteristic. An example of a positional characteristic is the Chinese fractional remainder theorem used in the prototype. Another positional characteristic can be introduced by I.Ya. Akush kernel function

Числа wi, называемые весами, в данной формуле могут быть в определенном смысле произвольными. Именно они определяют каждую конкретную функцию ядра и могут меняться в зависимости от задачи. Базовым свойством функции ядра является то, что ее максимальный диапазон может меняться и может быть значительно меньше числа P в зависимости от выбора весов. Например, мы можем в качестве C(P) использовать некоторое произвольное значение CP, обладающее необходимыми для решения конкретной задачи свойствами. Значения функции ядра C(X), заданной весами w1, w2, ..., wn, при условии 0<C(X)<CP, Xg[0,P], можно вычислить с использованием формулыThe numbers wi, called weights, in this formula can be arbitrary in a certain sense. They define each specific function of the kernel and can change depending on the task. The basic property of the kernel function is that its maximum range can vary and can be significantly less than the number P, depending on the choice of weights. For example, we can use some arbitrary value of CP as C(P), which has the properties necessary for solving a particular problem. The values of the kernel function C(X) given by the weights w1, w 2 , ..., w n , under the condition 0<C(X)<C P , Xg[0,P], can be calculated using the formula

С(Х) = У C(Bt) · xtC(X) = Y C(Bt) xt

Bi = , _ где p^ - ортогональные базисы СОК.Bi = , _ where p ^ are RNS orthogonal bases.

Однако в общем случае функция ядра не обладает монотонностью, необходимой для сравнения чи сел.However, in general, the kernel function does not have the monotonicity needed to compare numbers.

Для построения функции ядра с заданными свойствами воспользуемся алгоритмом 1.To construct a kernel function with given properties, we use Algorithm 1.

Алгоритм 1. Подбор параметров функции ядра специального вида для заданного набора модулей.Algorithm 1. Selection of parameters of a kernel function of a special type for a given set of modules.

Входные данные: набор модулей СОК p1, р2, ... , pn. Требуется построить функцию ядра с модулем специального вида с CP=R(N) и неотрицательными коэффициентами.Input data: set of RNS modules p1, р 2 , ... , p n . It is required to construct a kernel function with a module of a special form with C P =R(N) and non-negative coefficients.

Выходные данные: коэффициенты w1, w2, ..., wn построенной функции ядра.Output data: coefficients w1, w 2 , ..., wn of the constructed kernel function.

1. Положим вначале N=[log2 Pn].1. Let us first set N=[log 2 Pn].

wf = |R(A) -Pf1! , . = wf = |R(A) -Pf 1 ! , . =

2. Для заданной величины N рассчитать Pi i=1, 2, ..., n и cp rn yn 1=1 где R(N)=2n.2. For a given value N, calculate Pi i=1, 2, ..., n and c p rn yn 1=1 where R(N)=2 n .

3. Рассчитать Q по формуле P ’3. Calculate Q using the formula P ’

4. Если Q<0, то положить N=N+1 и перейти к шагу 2. Иначе, перейти к шагу 5.4. If Q<0, then put N=N+1 and go to step 2. Otherwise, go to step 5.

- 4 040463- 4 040463

5. Подобрать qi так, чтобы Q=q1+q2+...+qn. Рассчитать Wl + для i=1, 2, ..., n.5. Choose qi so that Q=q1+q2+...+qn. Calculate Wl + for i=1, 2, ..., n.

Λπ С(рО = Σ?=1νν(^] > 0 Λπ С(рО = Σ? =1 νν ( ^] > 0

6. Проверить условия отсутствия критических ядер снизу L^J и отсутствия кри- _ _____ Σ/ΑΗ + ιΚ-^χ). „ , , , _ _ _________ тических ядер сверху 7 для всех k=1, 2, ..., n. Если не выполняется, то положить6. Verify the conditions for the absence of critical kernels from below L ^ J and the absence of critical kernels. „ , , , _ _ _________ tic kernels from above 7 for all k=1, 2, ..., n. If not, then put

N=N+1 и перейти к шагу 2.N=N+1 and go to step 2.

Конец алгоритма 1.End of algorithm 1.

Тогда функция ядра с заданными свойствами будет задана выражениемThen the kernel function with the given properties will be given by the expression

С {Bi) · Χι с 00 = (3) гдеС {Bi) Xι с 00 = (3) where

Использование CP=2N позволит эффективно выполнять операции деления и нахождения остатка от деления, поскольку результат равен младшим N битам суммы.Using CP=2 N will allow efficient division and remainder operations, since the result is equal to the lower N bits of the sum.

Для сравнения чисел воспользуемся алгоритмом 2.To compare numbers, we use Algorithm 2.

Алгоритм 2. Сравнение чисел, представленных в СОК, с использованием функции ядра с неотрицательными коэффициентами.Algorithm 2. Comparison of numbers presented in RNS using a kernel function with non-negative coefficients.

Входные данные: X=(X1, X2, ..., Xn) и Y=(yb y2, ..., yn).Input data: X=(X1, X2, ..., Xn) and Y=(y b y2, ..., yn).

1. Вычислить C(X) и C(Y).1. Calculate C(X) and C(Y).

2. Сравнить:2. Compare:

(a) если C(X)<C(Y), то X<Y;(a) if C(X)<C(Y), then X<Y;

(b) если C(X)>C(Y), то X>Y;(b) if C(X)>C(Y), then X>Y;

(c) если C(X)=C(Y), то(c) if C(X)=C(Y), then

1) если xk<yk, то X<Y;1) if x k <y k , then X<Y;

2) если xk>yk, то X>Y;2) if x k >y k , then X>Y;

3) если xk=yk, то X=Y.3) if x k =y k , then X=Y.

Конец алгоритма 2.End of algorithm 2.

В данном случае взяты неотрицательные коэффициенты w1, w2, ..., wn и wk^0 - первый не равный нулю коэффициент.In this case, non-negative coefficients w1, w 2 , ..., w n and w k ^0 are taken - the first non-zero coefficient.

Для определения знака числа необходимо построить такую функцию ядра, чтобыTo determine the sign of a number, it is necessary to construct a kernel function such that

С(Х)<С(К) для положительных чисел, иC(X)<C(K) for positive numbers, and

C(X)>C(K) для отрицательных, где K=P/2, если P - четное,C(X)>C(K) for negative, where K=P/2 if P is even,

K=(P-1)/2, если P - нечетное.K=(P-1)/2 if P is odd.

K - является серединой диапазона СОК. Т.е. воспользоваться алгоритмом 2 для X и K.K - is the middle of the SOC range. Those. use Algorithm 2 for X and K.

Рассмотрим пример деления в СОК на основе функции (3) и алгоритма 2.Consider an example of division in RNS based on function (3) and algorithm 2.

Возьмем в качестве СОК {11, 13, 17, 19}. Тогда P=46189, P1=4199, P2=3553, Рз=2717, ?4=2431, ^=7, ^21=10, ^=11, ^41=18, B1=29393, B2=35530, B3=29887, B4=43758. Воспользовавшись алгоритмом 1, получим N=17, w1=16, w2=8, w3=5, w4=9.Let's take {11, 13, 17, 19} as RNS. Then P=46189, P1=4199, P2=3553, P3=2717, ?4=2431, ^=7, ^2 1 =10, ^=11, ^4 1 =18, B1=29393, B 2 =35530 , B3 =29887, B4=43758. Using Algorithm 1, we get N=17, w1=16, w 2 =8, w 3 =5, w 4 =9.

Тогда вспомогательные значения C(Bi) будут равны C(B1)=83408, C(B2)=100824, C(B3)=84811, C(B4)=124173. И функция ядра примет видThen the auxiliary values of C(Bi) will be equal to C(B1)=83408, C(B2)=100824, C(B 3 )=84811, C(B4)=124173. And the kernel function will take the form

С{Х) = |83408 · Х1 + 100824 · х2 + 84811 · х3 + 124173 · %4|2i7C(X) = |83408 X1 + 100824 x 2 + 84811 x 3 + 124173 % 4 | 2 i7

Серединой диапазона СОК будет K=23094, для которого C(K)=65517.The middle of the SOC range will be K=23094, for which C(K)=65517.

Найдем частное от деления Х=(5, 4, 3, 5) на Y=(1, 10, 6, 4). Проверим знаки делимого и делителя, для чего вычислим C(X) и C(Y):Find the quotient of X=(5, 4, 3, 5) divided by Y=(1, 10, 6, 4). Let's check the signs of the dividend and the divisor, for which we calculate C(X) and C(Y):

С(Х)=122770>65517=С(К), число отрицательное,C(X)=122770>65517=C(K), negative number,

C(Y)=54<65517=C(K), число положительное.C(Y)=54<65517=C(K), positive number.

Поскольку делимое и делитель разных знаков, то результат будет отрицательным. Для делимого найдем противоположное значение, чтобы выполнять деление над абсолютными значениями. Для этого в СОК необходимо из модуля вычесть соответствующий остаток.Since the dividend and divisor have different signs, the result will be negative. For the dividend, we find the opposite value in order to perform division over absolute values. To do this, in RNS it is necessary to subtract the corresponding remainder from the modulus.

-X = (Р1 - Х12 - χ2> ,„ιΡη - хп) = (11 - 5; 13 - 4; 17 - 3; 19 - 5)-X \u003d ( P1 - X1 , p 2 - χ 2> , „ ιΡη - x p ) \u003d (11 - 5; 13 - 4; 17 - 3; 19 - 5)

Получим |Х|=(6, 9, 14, 14). Представления степеней 2 в СОК могут быть вычислены заранее в зависимости от диапазона СОК (наивысшая степень вхождения 2n равна [log2 K]) и записаны в память:We get |X|=(6, 9, 14, 14). Representations of powers of 2 in RNS can be calculated in advance depending on the range of RNS (the highest degree of occurrence of 2 n is [log 2 K]) and stored in memory:

214 = (5,4,13,6),213 = (8,2,15,3),212 = (4,1,16,11),211 = (2,7,8,15)2 14 = (5,4,13,6),2 13 = (8,2,15,3),2 12 = (4,1,16,11),2 11 = (2,7,8,15 )

210 = (1,10,4,17),29 = (6,5,2,18),28 = (3,9,1,9),27 = (7,11,9,14)2 10 = (1,10,4,17),2 9 = (6,5,2,18),2 8 = (3,9,1,9),2 7 = (7,11,9,14 )

26 = (9,12,13,7),25 = (10,6,15,13),24 = (5,3,16,16),23 = (8,8,8,8)2 6 = (9,12,13,7),2 5 = (10,6,15,13),2 4 = (5,3,16,16),2 3 = (8,8,8,8 )

22 = (4,4,4,4),21 = (2,2,2,2),2° = (1,1,1,1)2 2 = (4,4,4,4),2 1 = (2,2,2,2),2° = (1,1,1,1)

Наивысшая возможная степень частного при выполнении деления равна размерности делимого. Для определения необходимо, последовательно умножая делитель на 21, найти число, для которого знаThe highest possible degree of the quotient when performing division is equal to the dimension of the dividend. To determine, it is necessary, by successively multiplying the divisor by 2 1 , to find a number for which

- 5 040463 чения функции ядра удовлетворяют выражению C(|X|)<C(21|Y|).- 5 040463 values of the kernel function satisfy the expression C(|X|)<C(2 1 |Y|).

С(26|Г|) = 4155 < С(|Х|) = 8264 < С(27|Г|) = 8331С(2 6 |Г|) = 4155 < С(|Х|) = 8264 < С(2 7 |Г|) = 8331

По формуле (2) вычислим Δ1=Χ-27·Υ :By formula (2) we calculate Δ1=X-2 7 Υ :

Δχ = (6,9,14,14) - (7,11,9,14) · (1,10,6,4) = (10,3,11,15), Ai < 0. Δχ = (6,9,14,14) - (7,11,9,14) (1,10,6,4) = (10,3,11,15), Ai < 0.

Значит, 27 не входит в представление частного Q.Hence, 2 7 is not included in the representation of the quotient Q.

Проверим 26, вычислив Δ2=Χ-26·Υ :Let's check 2 6 by calculating Δ 2 =X-2 6 ·Υ :

Δ2 = (6,9,14,14) - (9,12,13,7) · (1,10,6,4) = (8,6,4,5), Δ2 > 0.Δ 2 = (6,9,14,14) - (9,12,13,7) (1,10,6,4) = (8,6,4,5), Δ 2 > 0.

Значит, 26 входит в представление частного Q.Hence, 2 6 is included in the representation of the quotient Q.

Проверим 25, вычислив Δ32-25·Υ:Let's check 2 5 by calculating Δ 32 -2 5 Υ:

Δ3 = (8,6,4,5) - (10,6,15,13) · (1,10,6,4) = (9,11,16,10), Δ3 > 0.Δ 3 = (8,6,4,5) - (10,6,15,13) (1,10,6,4) = (9,11,16,10), Δ 3 > 0.

Значит, 25 входит в представление частного Q.Hence, 2 5 is included in the representation of the quotient Q.

Проверим 24, вычислив Δ43-24· Y:Let's check 2 4 by calculating Δ 43 -2 4 Y:

Δ4 = (9,11,16,10)-(5,3,16,16) · (1,10,6,4) = (4,7, 5, 3),Δ4 > 0.Δ 4 \u003d (9,11,16,10) - (5,3,16,16) (1,10,6,4) \u003d (4.7, 5, 3), Δ 4 \u003e 0.

Значит, 24 входит в представление частного Q.Hence, 2 4 is included in the representation of the quotient Q.

Проверим 23, вычислив Δ54-23·Υ:Let's check 23 by calculating Δ 54 -2 3 Υ:

Δ5 = (4, 7, 5, 3) - (8,8,8,8) · (1,10, 6,4) = (7, 5, 8,9), Δ5 > 0.Δ 5 = (4, 7, 5, 3) - (8.8,8.8) (1.10, 6.4) = (7, 5, 8.9), Δ 5 > 0.

Значит, 23 входит в представление частного Q.So 23 is included in the representation of the quotient Q.

Проверим 22, вычислив Δ65-22·Υ:Check 22 by calculating Δ 65 -2 2 Υ:

Δ6 = (7, 5,8,9) - (4,4,4,4) · (1,10,6,4) = (3,4,1,12), Δ6 > 0.Δ 6 = (7, 5,8,9) - (4,4,4,4) (1,10,6,4) = (3,4,1,12), Δ 6 > 0.

Значит, 22 входит в представление частного Q.So 22 is included in the representation of the quotient Q.

Проверим 21, вычислив Δ76-21·Υ:Let's check 21 by calculating Δ 7 = Δ 6 -2 1 Υ:

Δ7 = (3,4,1,12) - (2,2,2,2) · (1,10,6,4) = (1,10,6,4),Δ7 > 0.Δ 7 \u003d (3,4,1,12) - (2,2,2,2) (1,10,6,4) \u003d (1,10,6,4), Δ 7 \u003e 0.

Значит, 21 входит в представление частного Q.Hence, 2 1 is included in the representation of the quotient Q.

Проверим 20, вычислив Δ87-2ο· Y:Let's check 2 0 by calculating Δ 87 -2 ο Y:

Δ8 = (1,10,6,4) - (1,1,1,1) · (1,10,6,4) = (0,0,0,0), Δ7 = 0.Δ 8 = (1,10,6,4) - (1,1,1,1) (1,10,6,4) = (0,0,0,0), Δ 7 = 0.

Значит, 20 входит в представление частного Q.Hence, 2 0 is included in the representation of the quotient Q.

Таким образом, |Q | = 26 + 25 + 24 + 23 + 22 + 21 + 2° = 127.Thus, |Q| = 2 6 + 2 5 + 2 4 + 2 3 + 2 2 + 2 1 + 2° = 127.

2921 —ТГ = ~127·2921 -TG = ~ 127

Т.к. результат должен быть отрицательным, то Q=-127. Проверим 23 Because the result must be negative, then Q=-127. Let's check 23

Данное устройство деления чисел, представленных в СОК, поясняется фиг. 1-4.This device for dividing the numbers represented in the RNS is illustrated in FIG. 1-4.

На фиг. 1 представлена общая структурная схема устройства, которая содержит вход делимого 1, вход делителя 2, блок вычисления позиционных характеристик 3, блок уточнения аппроксимационного ряда 4, блок вывода частного 5 и выход частного 6. Входы делимого 1 и делителя 2 подключены к первому и второму входам блока вычисления позиционных характеристик 3. С первого выхода блока вычисления позиционных характеристик 3 значение знака результата поступает на первый вход блока вывода частного 5. Со второго выхода блока вычисления позиционных характеристик 3 на второй вход блока вывода частного 5 поступает сигнал |X|<|Y|, т.е. что результат деления равен 0. С третьего выхода блока вычисления позиционных характеристик 3 на третий вход блока вывода частного 5 поступает сигнал |X|=|Y|, т.е. что результат деления равен ±1 в зависимости от знаков входных чисел. С четвертого и шестого выходов блока вычисления позиционных характеристик 3 на первый и третий входы блока уточнения аппроксимационного ряда 4 поступают абсолютные значения делимого |X| и делителя |Y|. С пятого выхода блока вычисления позиционных характеристик 3 на второй вход блока уточнения аппроксимационного ряда 4 поступает значение функции ядра абсолютного значения делимого C(|X|). С первого выхода блока уточнения аппроксимационного ряда 4 на четвертый вход блока вывода частного 5 поступает сигнал окончания перебора степеней 2, входящих в представление частного Q. Со второго выхода блока уточнения аппроксимационного ряда 4 на пятый вход блока вывода частного 5 поступают степени 2, входящие в представление частного Q. Первый выход блока вывода частного 5 является выходом частного 6.In FIG. Figure 1 shows the general block diagram of the device, which contains the input of the dividend 1, the input of the divider 2, the block for calculating positional characteristics 3, the block for refining the approximation series 4, the output block of the quotient 5 and the output of the quotient 6. The inputs of the dividend 1 and divider 2 are connected to the first and second inputs block for calculating positional characteristics 3. From the first output of the block for calculating positional characteristics 3, the value of the sign of the result is fed to the first input of the output block of quotient 5. From the second output of the block for calculating positional characteristics 3, the signal |X|<|Y| , i.e. that the result of division is equal to 0. From the third output of the block for calculating positional characteristics 3, the signal |X|=|Y| that the result of division is ±1, depending on the signs of the input numbers. The absolute values of the dividend |X| and divisor |Y|. From the fifth output of the block for calculating positional characteristics 3, the value of the kernel function of the absolute value of the dividend C(|X|) arrives at the second input of the block for refining the approximation series 4. From the first output of the refinement block of the approximation series 4 to the fourth input of the output block of the quotient 5, the signal ends the enumeration of the powers of 2 included in the representation of the quotient Q. quotient Q. The first output of the quotient 5 output block is the output of quotient 6.

На фиг. 2 представлена схема блока вычисления позиционных характеристик 3, которая содержит инверторы делимого 7 и делителя 14, блоки умножения на константы 8, 11, 15, 18, блоки сложения 9, 12, 16, 19, блоки определения знака 10 и 17, мультиплексоры 13 и 20, элемент XOR 21, блок сравнения 22.In FIG. 2 shows a diagram of a block for calculating positional characteristics 3, which contains inverters of the dividend 7 and divider 14, blocks of multiplication by constants 8, 11, 15, 18, blocks of addition 9, 12, 16, 19, blocks for determining the sign 10 and 17, multiplexers 13 and 20, XOR element 21, comparison block 22.

На входы делимого 1 и делителя 2 поступают значения делимого X и делителя Y, представленные в СОК, т.к. (x1, x2, ..., xn) и (y1, у2, ..., yn). В инверторах делимого 7 и делителя 14 вычисляются противоположные значения -X и -Y соответственно. В СОК для получения противоположного значения -X необходимо из модуля вычесть соответствующий остаток (р1-х1, р22, ..., pn-xn). Затем числа X и -X, Y и -Y в блоках умножения на константы 8, 11, 15, 18 соответственно умножаются на константы значений функции ядра ортогональных базисов СОК C(Bi), т.е. в каждом блоке происходит параллельное умножение остатков на C(Bi) по формуле (3). Значения произведений с блоков умножения на константы 8, 11, 15, 18 подаются на входы блоков сложения 9, 12, 16, 19 соответственно, на выход которых подаются младшие N бит суммы, что соответствует нахождению остатка по модулю 2n в формуле (3), а N определяется заThe inputs of the dividend 1 and divisor 2 receive the values of the dividend X and divisor Y, presented in the RNS, because (x1, x 2 , ..., xn) and (y1, y 2 , ..., yn). In the inverters of dividend 7 and divider 14, the opposite values -X and -Y are calculated, respectively. In RNS, to obtain the opposite value of -X, it is necessary to subtract the corresponding remainder from the modulus (p1-x1, p 2 -x 2 , ..., pn-xn). Then the numbers X and -X, Y and -Y in the blocks of multiplication by the constants 8, 11, 15, 18 respectively are multiplied by the constants of the values of the function of the kernel of the RNS orthogonal bases C(Bi), i.e. in each block, the residuals are multiplied in parallel by C(Bi) according to formula (3). The values of the products from the blocks of multiplication by constants 8, 11, 15, 18 are fed to the inputs of the addition blocks 9, 12, 16, 19, respectively, the output of which is the least significant N bits of the sum, which corresponds to finding the remainder modulo 2 n in formula (3) , and N is determined for

- 6 040463 ранее по алгоритму 1 при построении функции ядра.- 6 040463 earlier according to algorithm 1 when constructing the kernel function.

На первые входы блоков определения знака 10 и 17 поступают значения делимого и делителя со входов делимого 1 и делителя 2 соответственно. На вторые входы блоков определения знака 10 и 17 поступают значения функции ядра C(X) и C(Y) с выходов блоков сложения 9 и 16 соответственно. В блоках определения знака 10 и 17 происходит сравнение значений функции ядра и остатков по одному из оснований с серединой диапазона K СОК по алгоритму 2. Значения знаков X и Y с выходов блоков определения знака 10 и 17 поступают на входы элемента XOR 21, а также на управляющие входы мультиплексоров 13 и 20 соответственно. Выход элемента XOR 21 является первым выходом блока вычисления позиционных характеристик 21.The first inputs of the blocks for determining the sign 10 and 17 receive the values of the dividend and divisor from the inputs of the dividend 1 and divisor 2, respectively. The values of the kernel function C(X) and C(Y) from the outputs of the addition blocks 9 and 16, respectively, arrive at the second inputs of the sign determination blocks 10 and 17, respectively. In the sign determination blocks 10 and 17, the values of the kernel function and the residuals are compared in one of the bases with the middle of the range K RNS according to algorithm 2. The values of the X and Y signs from the outputs of the sign determination blocks 10 and 17 are fed to the inputs of the XOR element 21, as well as to control inputs of the multiplexers 13 and 20, respectively. The output of the XOR element 21 is the first output of the block for calculating positional characteristics 21.

На первый и второй информационные входы мультиплексора 13 поступают значение функции ядра C(X) с выхода блока сложения 9 и значение делимого X с входа делимого 1. На третий и четвертый информационные входы мультиплексора 13 поступают значение функции ядра C(-X) с выхода блока сложения 12 и значение -X с выхода инвертора 7. Первый выход мультиплексора 13 подключен ко второму входу блока сравнения 22 и пятому выходу блока вычисления позиционных характеристик 3 и передает значение функции ядра от абсолютного значения делимого C(|X|). Второй выход мультиплексора 13 подключен к первому входу блока сравнения 22 и является четвертым выходом блока вычисления позиционных характеристик 3 и передает абсолютное значение делимого |X|.The first and second information inputs of the multiplexer 13 receive the value of the kernel function C(X) from the output of the addition block 9 and the value of the dividend X from the input of the dividend 1. The third and fourth information inputs of the multiplexer 13 receive the value of the kernel function C(-X) from the output of the block addition 12 and the value -X from the output of the inverter 7. The first output of the multiplexer 13 is connected to the second input of the comparison unit 22 and the fifth output of the unit for calculating positional characteristics 3 and transmits the value of the kernel function from the absolute value of the dividend C(|X|). The second output of the multiplexer 13 is connected to the first input of the comparison unit 22 and is the fourth output of the unit for calculating positional characteristics 3 and transmits the absolute value of the dividend |X|.

На первый и второй информационные входы мультиплексора 20 поступают значение функции ядра C(Y) с выхода блока сложения 16 и значение делителя Y с входа делителя 2. На третий и четвертый информационные входы мультиплексора 20 поступают значение функции ядра C(-Y) с выхода блока сложения 19 и значение -Y с выхода инвертора 14. Первый выход мультиплексора 20 подключен к третьему входу блока сравнения 22 и передает значение функции ядра от абсолютного значения делителя C(|Y|). Второй выход мультиплексора 20 подключен к четвертому входу блока сравнения 22, является шестым выходом блока вычисления позиционных характеристик 3 и передает абсолютное значение делителя |Y|.The first and second information inputs of the multiplexer 20 receive the value of the kernel function C(Y) from the output of the addition block 16 and the value of the divider Y from the input of the divider 2. The third and fourth information inputs of the multiplexer 20 receive the value of the kernel function C(-Y) from the output of the block addition 19 and the value -Y from the output of the inverter 14. The first output of the multiplexer 20 is connected to the third input of the comparator 22 and transmits the value of the kernel function from the absolute value of the divisor C(|Y|). The second output of the multiplexer 20 is connected to the fourth input of the comparison unit 22, is the sixth output of the unit for calculating positional characteristics 3 and transmits the absolute value of the divisor |Y|.

Блок сравнения 22 на основе алгоритма 2 по значениям C(|X|), |X| и C(|Y|), |Y| сравнивает абсолютные значения делимого и делителя и подает на первый выход блока сравнения 22 сигнал в случае |X|<|Y|, который поступает на второй выход блока вычисления позиционных характеристик 3, подает на второй выход блока сравнения 22 сигнал в случае |X|=|Y|, который поступает на третий выход блока вычисления позиционных характеристик 3.Comparison block 22 based on algorithm 2 for the values of C(|X|), |X| and C(|Y|), |Y| compares the absolute values of the dividend and divisor and sends a signal to the first output of the comparison block 22 in the case of |X|<|Y|, which goes to the second output of the block for calculating positional characteristics 3, sends a signal to the second output of the comparison block 22 in the case of |X|= |Y|, which is fed to the third output of the block for calculating positional characteristics 3.

На фиг. 3 изображен блок уточнения аппроксимационного ряда 4, который содержит регистр хранения уменьшаемого 23, регистр хранения делителя 24, блок умножения по модулю 25, регистр хранения степеней 2 26, блок отсчета степеней 27, демультиплексор 28, мультиплексор 29, блок вычитания по модулю 30, блоки умножения на константы 31 и 33, блоки сложения 32 и 34, блок определения знака 35, элемент И 36.In FIG. Figure 3 shows a block for refining the approximation series 4, which contains a register for storing the minuend 23, a divider storage register 24, a multiplication block modulo 25, a register for storing degrees 2 26, a block for reading degrees 27, a demultiplexer 28, a multiplexer 29, a subtraction block modulo 30, blocks multiplications by constants 31 and 33, addition blocks 32 and 34, sign determination block 35, AND element 36.

На первый вход регистра хранения уменьшаемого 23 поступает значение |X| с первого входа блока уточнения аппроксимационного ряда 4. Вход регистра хранения делителя 24 является третьим входом блока уточнения аппроксимационного ряда 4 и передает значение |Y| на первый вход блока умножения по модулю 25, в котором осуществляется умножение делителя на степени 2, представленные в СОК, которые поступают с первого выхода регистра хранения степеней 2 26. Дополнительно степени 2 с первого выхода регистра хранения степеней 2 26 поступают на второй вход демультиплексора 28, на первый вход которого поступает значение произведения с выхода блока умножения по модулю 25.The value of |X| from the first input of the refinement block of the approximation series 4. The input of the divider storage register 24 is the third input of the refinement block of the approximation series 4 and transmits the value |Y| to the first input of the multiplication unit modulo 25, in which the divisor is multiplied by powers of 2, represented in the SOC, which come from the first output of the storage register of degrees 2 26. Additionally, the degrees of 2 from the first output of the storage register of degrees 2 26 are fed to the second input of the demultiplexer 28 , the first input of which receives the value of the product from the output of the block of multiplication modulo 25.

Блок отсчета степеней 27 осуществляет определение степени 2, для которой произведение 2i-|Y|>|X|, и после проводит обратный отсчет степеней для проверки вхождения степени 2 в представление частного Q. Для определения максимальной степени 2 блок отсчета степеней 27 подает на первый выход, соединенный с первым входом регистра хранения степеней 2 26, значения адреса, начиная с 1, при этом максимальная степень равна [log2 K], регистр хранения степеней 2 26 подает на первый выход степени 2, представленные в СОК. На второй выход, подключенный к управляющему входу демультиплексора 28, подается значение режима работы: прямой или обратный отсчет степеней. В случае прямого отсчета значение произведения с выхода блока умножения по модулю подается на третий выход демультиплексора 28, который подключен ко входу блока умножения на константу 31, в котором происходит умножение на значения функции ядра от ортогональных базисов СОК C(Bi) и последующее их сложение в блоке сложения 32, младшие N бит результата подаются на второй вход блока отсчета степеней 27, где происходит его сравнение со значением функции ядра делимого, которое поступает на первый вход блока отсчета степеней 27 со второго входа блока уточнения аппроксимационного ряда 4. В случае обратного отсчета значение произведения с выхода блока умножения по модулю подается на первый выход демультиплексора 28, на второй выход которого подается значение степени 2. По окончании обратного отсчета на третий выход блока отсчета степеней 27 подается сигнал окончания отсчета.The power count 27 determines the degree 2 for which the product 2 i -|Y|>|X| the first output connected to the first input of the power storage register 2 26, the address values starting from 1, while the maximum degree is [log 2 K], the power storage register 2 26 supplies the first power output of 2 represented in the SOC. The second output, connected to the control input of the demultiplexer 28, is supplied with the value of the operating mode: direct or reverse countdown degrees. In the case of direct reading, the value of the product from the output of the modulo multiplication block is fed to the third output of the demultiplexer 28, which is connected to the input of the constant multiplication block 31, in which multiplication takes place by the values of the kernel function from the orthogonal bases of the SOC C(Bi) and their subsequent addition to addition block 32, the least significant N bits of the result are fed to the second input of the power readout block 27, where it is compared with the value of the kernel function of the dividend, which is fed to the first input of the power readout block 27 from the second input of the refinement block of the approximation series 4. In the case of a countdown, the value the product from the output of the multiplication unit modulo is fed to the first output of the demultiplexer 28, the second output of which is supplied with the value of the degree 2. At the end of the countdown, the end of the counting signal is sent to the third output of the reading unit of degrees 27.

В блоке вычитания по модулю 30 происходит вычитание по формуле (2) из уменьшаемого, которое подается на первый вход с выхода регистра хранения уменьшаемого 23 произведения с первого выхода демультиплексора 28, которое подается на второй вход блока вычитания по модулю 30. Результат вычитания подается на вход блока умножения на константы 33, откуда через блок сложения 34 поступает наIn the subtraction unit modulo 30, subtraction takes place according to the formula (2) from the minuend, which is fed to the first input from the output of the storage register of the reduced product 23 from the first output of the demultiplexer 28, which is fed to the second input of the subtraction unit modulo 30. The result of the subtraction is fed to the input block of multiplication by constants 33, from where through the addition block 34 comes to

- 7 040463 первый вход блока определения знака 35, второй вход которого подключен к выходу блока вычитания по модулю 30, который также подключен ко второму информационному входу мультиплексора 29. Выход блока определения знака 35 подключен через инвертор к первому выходу элементу И 36, на второй вход которого поступают степени 2 со второго выхода демультиплексора 28 и на управляющий вход мультиплексора 29, первый вход которого соединен с выходом регистра хранения уменьшаемого 23, а выход мультиплексора 29 подключен ко второму входу регистра хранения уменьшаемого 23. Выход элемента И 36 является вторым выходом блока уточнения аппроксимационного ряда 4.- 7 040463 the first input of the sign detection unit 35, the second input of which is connected to the output of the subtraction unit modulo 30, which is also connected to the second information input of the multiplexer 29. The output of the sign detection unit 35 is connected through an inverter to the first output element And 36, to the second input of which power 2 comes from the second output of the demultiplexer 28 and to the control input of the multiplexer 29, the first input of which is connected to the output of the storage register of the reduced 23, and the output of the multiplexer 29 is connected to the second input of the storage register of the reduced 23. The output of the AND element 36 is the second output of the refinement unit of the approximation row 4.

На фиг. 4 изображен блок вывода частного 5, содержащий блок сложения по модулю 37, демультиплексор 38, инвертор 39, регистр хранения 1 в СОК 40, регистр хранения -1 в СОК 41, мультиплексор частного 42, мультиплексор единицы 43, мультиплексор выбор частного 44, элемент И 45.In FIG. Figure 4 shows a quotient 5 output block containing a modulo addition block 37, a demultiplexer 38, an inverter 39, a holding register 1 in the SOC 40, a holding register -1 in the SOC 41, a quotient multiplexer 42, a unity multiplexer 43, a quotient select multiplexer 44, an AND element 45.

Степени 2 с пятого входа блока вывода частного 5 поступают на первый вход блока сложения по модулю 37, выход которого соединен с информационным выходом демультиплексора 38, который в зависимости от сигнал окончания отсчета на управляющий вход демультиплексора 38 с четвертого входа блока вывода частного 5 подает результат на второй вход блока сложения по модулю 37 или на второй информационный вход мультиплексора частного 42 и на первый информационный вход мультиплексора частного 42 через инвертор 39. Сигнал знака Q с первого входа блока вывода частного 5 поступает на управляющие входы мультиплексора частного 42 и мультиплексора единицы 43, на первый и второй информационные входы которого поступают сигналы с выходов регистра хранения 1 в СОК 40 и регистра хранения -1 в СОК соответственно. Выходы мультиплексора частного 42 и мультиплексора единицы 43 подключены к первому и второму информационным входам мультиплексора выбора частного 44, на управляющий вход которого поступает сигнал |X|=|Y| с третьего входа блока вывода частного 5. Выход мультиплексора частного 44 подключен к первому входу элемента И 45, на второй вход которого через инвертор поступает сигнал |X|<|Y| со второго входа вывода частного 5. Выход элемента И 45 является выходом частного 6.Degrees 2 from the fifth input of the quotient 5 output block are fed to the first input of the modulo addition block 37, the output of which is connected to the information output of the demultiplexer 38, which, depending on the countdown signal to the control input of the quotient 38, from the fourth input of the quotient 5 output block, supplies the result to the second input of the modulo addition block 37 or to the second information input of the private multiplexer 42 and to the first information input of the private multiplexer 42 through the inverter 39. The Q sign signal from the first input of the private output unit 5 is fed to the control inputs of the private multiplexer 42 and unity multiplexer 43, to the first and second information inputs of which receive signals from the outputs of the storage register 1 in the SOC 40 and the storage register -1 in the SOC, respectively. The outputs of the private multiplexer 42 and unity multiplexer 43 are connected to the first and second information inputs of the private selection multiplexer 44, the control input of which receives the signal |X|=|Y| from the third input of the private output unit 5. The output of the multiplexer private 44 is connected to the first input of the element And 45, the second input of which is fed through the inverter signal |X|<|Y| from the second input of the output of quotient 5. The output of the element And 45 is the output of quotient 6.

Рассмотрим предыдущий пример для СОК {p1, p2, p3, p4}={11, 13, 17, 19}. Для данной СОК по алгоритму 1 рассчитываются внутренние параметры N=17, w1= 16, w2=8, w3=5, w4=9. Блоки умножения на константы 8, 11, 15, 18, 31, 33 осуществляют умножения каждого из четырех остатков числа на C(B1)=83408, C(B2)=100824, C(B3)=84811, C(B4)=124173 соответственно. Блоки сложения 9, 12, 16, 19, 32 осуществляют сложение полученных произведений и вывод младших N бит числа. Таким образом, пары блоков умножения на константы с блоками сложения реализуют выполнение формулы C(X)=|83408-x1+100824-x2+84811-x3+124173-x4|2 . Инверторы находят противоположное значение для числа, представленного в СОК, для чего из модуля вычитают соответствующий остаток.Consider the previous example for RNS {p1, p 2 , p 3 , p 4 }={11, 13, 17, 19}. For this SOC, algorithm 1 calculates internal parameters N=17, w1= 16, w 2 =8, w 3 =5, w 4 =9. Multiplication blocks for constants 8, 11, 15, 18, 31, 33 multiply each of the four remainders of the number by C(B1)=83408, C(B2)=100824, C(B 3 )=84811, C(B 4 ) =124173 respectively. Addition blocks 9, 12, 16, 19, 32 carry out the addition of the obtained products and the output of the lower N bits of the number. Thus, pairs of blocks of multiplication by constants with blocks of addition implement the formula C(X)=|83408-x 1 +100824-x 2 +84811-x 3 +124173-x 4 | 2 . Inverters find the opposite value for the number presented in the SOC, for which the corresponding remainder is subtracted from the module.

На вход делимого 1 подается X=(5, 4, 3, 5), которое после вычисления функции ядра блоками умножения на константы 8 и сложения 9 подает значение C(X)=122770 на второй вход блока определения знака 10, на первый вход которого подается X=(5, 4, 3, 5) с входа делимого 1. В блоке определения знака 10 происходит сравнение с K=23094 и C(K)=65517 по алгоритму 2. Значение знака X равно 1 (отрицательное) и поступает на управляющий вход мультиплексора делимого 13 и на первый вход элемента XOR 21. Также значение X=(5, 4, 3, 5) поступает на инвертор 7, результатом которого будет -X=(p1-x1, p2-x2, ..., pn-xn)=(6, 9, 14, 14). После вычисления функции ядра блоками умножения на константы 11 и сложения 12 получают C(-X)=8264. На первый информационный вход мультиплексора 13 подается C(X)=122770, на второй информационный вход подается X=(5, 4, 3, 5), на третий информационный вход подается C(-X)=8264, на четвертый информационный вход подается -X=(6, 9, 14, 14). Поскольку делимое отрицательное, то на первый выход мультиплексора 13 подается C(|X|)=8264, а на второй выход - |X|=(6, 9, 14, 14).The input of the dividend 1 is X=(5, 4, 3, 5), which, after calculating the kernel function by the blocks of multiplication by constants 8 and addition 9, supplies the value C(X)=122770 to the second input of the sign determination block 10, to the first input of which X=(5, 4, 3, 5) is supplied from the input of the dividend 1. In the sign determination block 10, a comparison is made with K=23094 and C(K)=65517 according to algorithm 2. The sign value of X is 1 (negative) and enters the control input of the dividend multiplexer 13 and to the first input of the XOR element 21. Also, the value X=(5, 4, 3, 5) is fed to the inverter 7, the result of which will be -X=(p 1 -x 1 , p 2 -x 2 , ..., p n -x n )=(6, 9, 14, 14). After calculating the kernel function by blocks of multiplication by constants 11 and addition 12, C(-X)=8264 is obtained. The first information input of the multiplexer 13 is supplied with C(X)=122770, the second information input is supplied with X=(5, 4, 3, 5), the third information input is supplied with C(-X)=8264, the fourth information input is supplied with - X=(6, 9, 14, 14). Since the dividend is negative, then C(|X|)=8264 is fed to the first output of the multiplexer 13, and |X|=(6, 9, 14, 14) to the second output.

Одновременно на вход делителя 2 подается Y=(1, 10, 6, 4), которое после вычисления функции ядра блоками умножения на константы 15 и сложения 16 подает значение C(Y)=54 на второй вход блока определения знака 17, на первый вход которого подается Y=(1, 10, 6, 4) с входа делителя 2. В блоке определения знака 17 происходит сравнение с K=23094 и C(K)=65517 по алгоритму 2. Значение знака Y равно 0 (положительное) и поступает на управляющий вход мультиплексора делителя 20 и на второй вход элемента XOR 21. Также значение Y=(1, 10, 6, 4) поступает на инвертор 14, результатом которого будет Y=(10, 3, 11, 15). После вычисления функции ядра блоками умножения на константы 18 и сложения 19 получают C(-Y)=130980. На первый информационный вход мультиплексора 20 C(Y)=54, на второй информационный вход подается Y=(1, 10, 6, 4), на третий информационный вход подается C(-Y)=130980, на четвертый информационный вход подается -Y=(10, 3, 11, 15). Поскольку делитель положительный, то на первый выход мультиплексора 20 подается C(|Y|)=54, а на второй выход - |Y|=(1, 10, 6, 4).At the same time, Y=(1, 10, 6, 4) is fed to the input of the divider 2, which, after calculating the kernel function by the blocks of multiplication by constants 15 and addition 16, supplies the value C(Y)=54 to the second input of the sign determination block 17, to the first input of which Y=(1, 10, 6, 4) is supplied from the input of divider 2. In the sign determination block 17, a comparison is made with K=23094 and C(K)=65517 according to algorithm 2. The sign value of Y is 0 (positive) and enters to the control input of the divider multiplexer 20 and to the second input of the XOR element 21. Also, the value Y=(1, 10, 6, 4) is fed to the inverter 14, the result of which will be Y=(10, 3, 11, 15). After calculating the kernel function by blocks of multiplication by constants 18 and addition 19, C(-Y)=130980 is obtained. The first information input of the multiplexer 20 C(Y)=54, the second information input is Y=(1, 10, 6, 4), the third information input is C(-Y)=130980, the fourth information input is -Y =(10, 3, 11, 15). Since the divisor is positive, then C(|Y|)=54 is fed to the first output of the multiplexer 20, and |Y|=(1, 10, 6, 4) to the second output.

Поскольку знаки у делимого X и делителя Y разные, на выход элемента XOR 21 подается сигнал 1, т.е. результат отрицательный. В блоке сравнения 22 на основе алгоритма 2 сравниваются C(|X|)=8264 и |X|=(6, 9, 14, 14) с C(|Y|)=54 и |Y|=(1, 10, 6, 4), поступающими с мультиплексоров 13 и 20. Поскольку C(|X|)=8264>C(|Y|)=54, то |X|>|Y| и на выходы |X|<|Y| и |X|=|Y| подаются 0.Since the signs of the dividend X and divisor Y are different, a signal 1 is applied to the output of the XOR element 21, i.e. the result is negative. Comparator 22 compares C(|X|)=8264 and |X|=(6, 9, 14, 14) with C(|Y|)=54 and |Y|=(1, 10, 6, 4) coming from multiplexers 13 and 20. Since C(|X|)=8264>C(|Y|)=54, then |X|>|Y| and to the outputs |X|<|Y| and |X|=|Y| served 0.

Таким образом, на первый выход блока вычисления позиционных характеристик 3 подается знак результата 1, на второй и третий выходы подаются нули, что означает невыполнение условий |X|<|Y| и |X|=|Y|. На четвертый, пятый и шестой выходы подаются соответственно значения |X|=(6, 9, 14, 14),Thus, the result sign 1 is sent to the first output of the block for calculating positional characteristics 3, zeros are sent to the second and third outputs, which means that the conditions |X|<|Y| and |X|=|Y|. The fourth, fifth and sixth outputs are supplied with the values |X|=(6, 9, 14, 14), respectively,

- 8 040463- 8 040463

C(|X|)=8264 и Y|=(1, 10, 6, 4).C(|X|)=8264 and Y|=(1, 10, 6, 4).

На вход регистра хранения делимого 24 подается |Y|=(1, 10, 6, 4). Блок отсчета степеней 27 подает на первый выход адрес степени 21, представленной в СОК, которая хранится в регистре хранения степеней 2 26. Значение (2, 2, 2, 2) подается на второй вход блока умножения по модулю 25, на первый вход которого подается (1, 10, 6, 4). Результат (2, 7, 12, 8) под действием сигнала на управляющий вход демультиплексора 28 подается на блоки умножения на константу 31 и сложения 32, в которых вычисляется значение функции ядра C(2|Y|)=116. В блоке отсчета степеней 27 данное значение сравнивается с C(|X|)=8264, которое поступает на первый вход, и поскольку 116<8264, продолжается прямой отсчет степеней. Данный отсчет продолжается до 27, для которого C(27|Y|)=8331. После этого блок отсчета степеней 27 переходит в обратный отсчет и подает соответствующий сигнал на управляющий вход демультиплексора 28.The input of the dividend storage register 24 is |Y|=(1, 10, 6, 4). The power count unit 27 supplies the first output with the address of the power 2 1 represented in the SOC, which is stored in the storage register of the degrees 2 26. The value (2, 2, 2, 2) is fed to the second input of the multiplication modulo 25, the first input of which served (1, 10, 6, 4). The result (2, 7, 12, 8) under the action of a signal to the control input of the demultiplexer 28 is fed to the blocks of multiplication by a constant 31 and addition 32, in which the value of the kernel function C(2|Y|)=116 is calculated. In the power count block 27, this value is compared with C(|X|)=8264, which is the first input, and since 116<8264, the forward counting of powers continues. This count continues up to 2 7 , for which C(2 7 |Y|)=8331. After that, the count of degrees 27 goes into the countdown and supplies the appropriate signal to the control input of the demultiplexer 28.

Блок отсчета степеней 27 подает на первый выход адрес степени 27, представленной в СОК, которая хранится в регистре хранения степеней 2 26. Значение (7, 11, 9, 14) подается на второй вход блока умножения по модулю 25, на первый вход которого подается (1, 10, 6, 4). Результат (7, 6, 3, 18) под действием сигнала на управляющий вход демультиплексора 28 подается на второй вход блока вычитания по модулю 30, на первый вход которого подается |X|=(6, 9, 14, 14). Результат Δ1=(10, 3, 11, 15) подается на блоки умножения на константу 33 и сложения 34, в которых вычисляется значение функции ядра C(Δ1)=130980, которое поступает на первый вход блока определения знака 35, на второй вход которого поступает значение Δ1, поскольку число C(Δ1)>C(K), то Δ1<0 и 27 не входит в представление частного Q. На выход блока определения знака 35 подается 1, которая поступает на управляющий вход мультиплексора 29, перезаписывая значение |X| в регистре хранения уменьшаемого 23. Также 1 с выхода блока определения знака 35 подается на инвертированный первый вход элемента И 36, обнуляя значение степени 27, подаваемой со второго выхода демультиплексора 28.The power count unit 27 feeds to the first output the address of the power 2 7 represented in the SOC, which is stored in the storage register of the degrees 2 26. served (1, 10, 6, 4). The result (7, 6, 3, 18) under the action of a signal to the control input of the demultiplexer 28 is fed to the second input of the subtraction unit modulo 30, the first input of which is |X|=(6, 9, 14, 14). The result Δ1=(10, 3, 11, 15) is fed to blocks of multiplication by a constant 33 and addition 34, in which the value of the kernel function C(Δ 1 )=130980 is calculated, which is fed to the first input of the sign determination block 35, to the second input which receives the value Δ1, since the number C(Δ 1 )>C(K), then Δ1<0 and 2 7 is not included in the representation of private Q. The output of the sign determination block 35 is 1, which is fed to the control input of the multiplexer 29, overwriting value |X| in the storage register of the reduced 23. Also, 1 from the output of the sign determination block 35 is fed to the inverted first input of the AND element 36, zeroing out the value of the degree 2 7 supplied from the second output of the demultiplexer 28.

Далее блок отсчета степеней 27 подает на первый выход адрес степени 26, представленной в СОК, которая хранится в регистре хранения степеней 2 26. Значение (9, 12, 13, 7) подается на второй вход блока умножения по модулю 25, на первый вход которого подается (1, 10, 6, 4). Результат (9, 3, 10, 9) под действием сигнала на управляющий вход демультиплексора 28 подается на второй вход блока вычитания по модулю 30, на первый вход которого подается |X|=(6, 9, 14, 14). Результат Δ2=(8, 6, 4, 5) подается на блоки умножения на константу 33 и сложения 34, в которых вычисляется значение функции ядра C(Δ2)=4093, которое поступает на первый вход блока определения знака 35, на второй вход которого поступает значение Δ2, поскольку число C^2)<C(K), то Δ2>0 и 26 входит в представление частного Q. На выход блока определения знака 35 подается 0, которая поступает на управляющий вход мультиплексора 29, записывая значение Δ2 в регистре хранения уменьшаемого 23. Также 0 с выхода блока определения знака 35 подается на инвертированный первый вход элемента И 36, пропуская значение степени 26, подаваемой со второго выхода демультиплексора 28, на второй выход блока уточнения аппроксимационного ряда 4.Next, the power count 27 sends to the first output the address of the power 2 6 represented in the SOC, which is stored in the storage register of the powers 2 26. The value (9, 12, 13, 7) is fed to the second input of the multiplication modulo 25, to the first input which is served (1, 10, 6, 4). The result (9, 3, 10, 9) under the action of a signal to the control input of the demultiplexer 28 is fed to the second input of the subtraction unit modulo 30, the first input of which is |X|=(6, 9, 14, 14). The result Δ2=(8, 6, 4, 5) is fed to blocks of multiplication by a constant 33 and addition 34, in which the value of the kernel function C(Δ2)=4093 is calculated, which is fed to the first input of the sign determination block 35, to the second input of which the value Δ2 arrives, since the number C^2)<C(K), then Δ2>0 and 2 6 enters the representation of the quotient Q. The output of the sign determination block 35 is supplied with 0, which is fed to the control input of the multiplexer 29, writing the value Δ2 to the reduced storage register 23. Also, 0 from the output of the sign determination block 35 is fed to the inverted first input of the AND element 36, skipping the power value 2 6 supplied from the second output of the demultiplexer 28, to the second output of the refinement block of the approximation series 4.

Аналогично проверяются остальные степени. Наконец, блок отсчета степеней 27 подает на первый выход адрес степени 20, представленной в СОК, которая хранится в регистре хранения степеней 2 26. Значение (1, 1, 1, 1) подается на второй вход блока умножения по модулю 25, на первый вход которого подается (1, 10, 6, 4). Результат (1, 10, 6, 4) под действием сигнала на управляющий вход демультиплексора 28 подается на второй вход блока вычитания по модулю 30, на первый вход которого подается Δ7=(1, 10, 6, 4) с выхода регистра хранения уменьшаемого. Результат Δ8=(0, 0, 0, 0) подается на блоки умножения на константу 33 и сложения 34, в которых вычисляется значение функции ядра C(Δ2)=0, которое поступает на первый вход блока определения знака 35, на второй вход которого поступает значение Δ8, поскольку число C(Δ2)<C(K), то Δ8>0 и 20 входит в представление частного Q. На выход блока определения знака 35 подается 0, которая поступает на управляющий вход мультиплексора 29, записывая значение Δ8 в регистре хранения уменьшаемого 23. Также 0 с выхода блока определения знака 35 подается на инвертированный первый вход элемента И 36, пропуская значение степени 20, подаваемой со второго выхода демультиплексора 28, на второй выход блока уточнения аппроксимационного ряда 4. Поскольку отсчет закончен, на третий выход блока отсчета степеней 27 подается сигнал окончания отсчета.Other degrees are checked similarly. Finally, the power count unit 27 feeds to the first output the address of the power 20 represented in the RNS, which is stored in the storage register of powers 2 26. The value (1, 1, 1, 1) is fed to the second input of the multiplication modulo 25 block, to the first input which is served (1, 10, 6, 4). The result (1, 10, 6, 4) under the action of a signal to the control input of the demultiplexer 28 is fed to the second input of the subtraction unit modulo 30, the first input of which is fed Δ 7 =(1, 10, 6, 4) from the output of the storage register of the reduced . The result Δ 8 =(0, 0, 0, 0) is fed to blocks of multiplication by a constant 33 and addition 34, in which the value of the kernel function C(Δ 2 )=0 is calculated, which is fed to the first input of the sign determination block 35, to the second the input of which enters the value Δ8, since the number C(Δ 2 )<C(K), then Δ 8 >0 and 2 0 is included in the representation of the quotient Q. The output of the sign determination unit 35 is 0, which is fed to the control input of the multiplexer 29, writing the value Δ8 in the storage register of the reduced 23. Also, 0 from the output of the sign determination block 35 is fed to the inverted first input of the AND element 36, skipping the power value 2 0 supplied from the second output of the demultiplexer 28, to the second output of the refinement unit of the approximation series 4. Since the count completed, the third output of the counting unit degrees 27 is signaled the end of the count.

В блоке вывода частного 4 происходит формирование итогового частного. На первый вход блока сложения по модулю 37 последовательно поступают степени 2, входящие в представление частного Q, на второй вход блока сложения по модулю 37 поступает сумма ранее полученных степеней. Так число 27 после логического умножения с нулем равно (0, 0, 0, 0), поступая на первый вход, складывается с (0, 0, 0, 0). Далее 26=(9, 12, 13, 7) складывается с (0, 0, 0, 0). 25=(10, 6, 15, 13) складывается с 26=(9, 12, 13, 7), 24=(5, 3, 16, 16) складывается с 26+25=(8, 5, 11, 1), 23=(8, 8, 8, 8) складывается с 26+25+24=(2, 8, 10, 17), 22=(4, 4, 4, 4) складывается с 26+25+24+23=(10, 3, 1, 6), 21=(2, 2, 2, 2) складывается с 26+25+24+23+22=(3, 7, 5, 10), 20=(1, 1, 1, 1) складывается с 26+25+24+23+22+21=(5, 9, 7, 12) и результат (6, 10, 8, 13) под действием сигнала окончания отсчета четвертого входа блока вывода частного 5 на управляющий вход демультиплексора 38 поступает на вход инвертора 39, где находится противоположное значение (5, 3, 9, 6), поIn the quotient output block 4, the final quotient is formed. The first input of the modulo 37 addition block receives successively the powers of 2 included in the representation of the quotient Q, the second input of the modulo 37 addition block receives the sum of the previously obtained degrees. So the number 2 7 after logical multiplication with zero is (0, 0, 0, 0), entering the first input, added to (0, 0, 0, 0). Further 2 6 =(9, 12, 13, 7) is added to (0, 0, 0, 0). 25=(10, 6, 15, 13) adds up to 2 6 =(9, 12, 13, 7), 2 4 =(5, 3, 16, 16) adds up to 26+25=(8, 5, 11 , 1), 2 3 =(8, 8, 8, 8) adds up to 26+25+24=(2, 8, 10, 17), 22=(4, 4, 4, 4) adds up to 2 6 + 2 5 +2 4 +2 3 =(10, 3, 1, 6), 21=(2, 2, 2, 2) adds up to 26+25+24+23+22=(3, 7, 5, 10 ), 2 0 =(1, 1, 1, 1) is added to 26+25+24+23+22+21=(5, 9, 7, 12) and the result is (6, 10, 8, 13) under the action the countdown signal of the fourth input of the private output unit 5 to the control input of the demultiplexer 38 is fed to the input of the inverter 39, where the opposite value (5, 3, 9, 6) is located, according to

--

Claims (1)

ступающее на первый вход мультиплексора частного 42, на второй вход которого поступает (6, 10, 8, 13) со второго выхода демультиплексора 38. Поскольку на управляющие входы мультиплексора частного 42 и мультиплексора единицы 43 поступает сигнал, что результат отрицательный, на выход данных мультиплексоров подаются значение (5, 3, 9, 6) с инвертора 39 и (10, 12, 16, 18) с регистра хранения -1 в СОК. Под действием сигнала |X|=|Y| (в данном случае 0) с третьего входа блока вывода частного 5 на управляющий вход мультиплексора выбора частного 44 на выход подается значение (5, 3, 9, 6) с инвертора 39, и поскольку сигнал |X|<|Y| (в данном случае 0) с второго входа блока вывода частного 5 инвертируется вторым входом элемента И 45, то на выход частного 6 подается значение (5, 3,9, 6), которое соответствует значению -127.stepping on the first input of the private multiplexer 42, the second input of which receives (6, 10, 8, 13) from the second output of the demultiplexer 38. the value (5, 3, 9, 6) is supplied from the inverter 39 and (10, 12, 16, 18) from the storage register -1 to the SOC. Under the action of the signal |X|=|Y| (in this case 0) from the third input of the output block private 5 to the control input of the multiplexer select private 44, the output is the value (5, 3, 9, 6) from the inverter 39, and since the signal |X|<|Y| (in this case, 0) from the second input of the output block of quotient 5 is inverted by the second input of the element AND 45, then the value (5, 3.9, 6) is supplied to the output of quotient 6, which corresponds to the value -127. Реализация всего устройства возможна с использованием программируемых логических интегральных схем (ПЛИС) и может использоваться как отдельное устройство или как сопроцессор для выполнения немодульных операций.Implementation of the entire device is possible using programmable logic integrated circuits (FPGA) and can be used as a standalone device or as a coprocessor to perform non-modular operations. ФОРМУЛА ИЗОБРЕТЕНИЯCLAIM Устройство деления чисел, представленных в системе остаточных классов, содержащее входы делимого и делителя, блок вычисления позиционных характеристик, блок уточнения аппроксимационного ряда, блок вывода частного и выход частного, при этом вход делимого и вход делителя соединены с первым и вторым входами блока вычисления позиционных характеристик;A device for dividing numbers presented in the system of residual classes, containing the inputs of the dividend and divisor, a block for calculating positional characteristics, a block for refining the approximation series, a block for deriving a quotient and an output of a quotient, while the input of the dividend and the input of the divisor are connected to the first and second inputs of the block for calculating positional characteristics ; первый, второй и третий выходы блока вычисления позиционных характеристик соединены с первым, вторым и третьим входами блока вывода частного;the first, second and third outputs of the positional characteristics calculation unit are connected to the first, second and third inputs of the private output unit; четвертый и шестой выходы блока вычисления позиционных характеристик соединены с первым и третьим входами блока уточнения аппроксимационного ряда, первый и второй выходы которого соединены с четвертым и пятым входами блока вывода частного, выход которого является выходом частного; и блок вычисления позиционных характеристик содержит два инвертора, четыре блока умножения на константы, четыре блока сложения, два мультиплексора, элемент XOR и блок сравнения, при этом значение делимого, представленное в СОК, с первого входа поступает на вход первого блока умножения на константы и на вход первого инвертора, выход которого подключен ко входу второго блока умножения на константы;the fourth and sixth outputs of the block for calculating positional characteristics are connected to the first and third inputs of the block for refining the approximation series, the first and second outputs of which are connected to the fourth and fifth inputs of the quotient output block, the output of which is the output of the quotient; and the block for calculating positional characteristics contains two inverters, four blocks of multiplication by constants, four blocks of addition, two multiplexers, an XOR element and a comparison block, while the value of the dividend, presented in the SOC, from the first input is fed to the input of the first block of multiplication by constants and to the input of the first inverter, the output of which is connected to the input of the second block of multiplication by constants; выходы первого и второго блоков умножения на константы подключены ко входам первого и второго блоков сложения, выходы которых соединены с первым и третьим входами первого мультиплексора;the outputs of the first and second blocks of multiplication by constants are connected to the inputs of the first and second addition blocks, the outputs of which are connected to the first and third inputs of the first multiplexer; значение делителя, представленное в СОК, со второго входа блока вычисления позиционных характеристик поступает на вход третьего блока умножения на константы и на вход второго инвертора, выход которого подключен ко входу четвертого блока умножения на константы;the divisor value presented in the SOC, from the second input of the block for calculating positional characteristics, is fed to the input of the third block of multiplication by constants and to the input of the second inverter, the output of which is connected to the input of the fourth block of multiplication by constants; выходы третьего и четвертого блоков умножения на константы подключены ко входам третьего и четвертого блоков сложения, выходы которых соединены с первым и третьим входами второго мультиплексора;the outputs of the third and fourth blocks of multiplication by constants are connected to the inputs of the third and fourth addition blocks, the outputs of which are connected to the first and third inputs of the second multiplexer; первые выходы первого и второго мультиплексоров подключены ко второму и третьему входам блока сравнения, первый и второй выходы которого являются вторым и третьим выходами блока вычисления позиционных характеристик;the first outputs of the first and second multiplexers are connected to the second and third inputs of the comparison unit, the first and second outputs of which are the second and third outputs of the unit for calculating positional characteristics; первый выход первого мультиплексора дополнительно соединен с пятым выходом блока вычисления позиционных характеристик;the first output of the first multiplexer is additionally connected to the fifth output of the block for calculating positional characteristics; выход элемента XOR является первым выходом блока вычисления позиционных характеристик; и блок уточнения аппроксимационного ряда содержит регистр хранения уменьшаемого, блок вычитания по модулю, мультиплексор, регистр хранения степеней 2, блок отсчета степеней и элемент И, при этом выход блока вычитания по модулю соединен со вторым входом мультиплексора, выход которого соединен со вторым входом регистра хранения уменьшаемого;the output of the XOR element is the first output of the positional characteristics calculation block; and the block for refining the approximation series contains a storage register for the reduced, a modulo subtraction block, a multiplexer, a storage register for powers 2, a power reading block, and an AND element, while the output of the modulo subtraction block is connected to the second input of the multiplexer, the output of which is connected to the second input of the storage register reduced; третий выход блока отсчета степеней является первым выходом блока уточнения аппроксимационного ряда;the third output of the power reading block is the first output of the approximation series refinement block; выход элемента И является вторым выходом блока уточнения аппроксимационного ряда; и блок вывода частного содержит блок сложения по модулю, демультиплексор, инвертор, регистр хранения 1 в СОК, регистр хранения -1 в СОК, мультиплексор частного, мультиплексор единицы и мультиплексор выбора частного, при этом первый вход блока сложения по модулю является пятым входом блока вывода частного;the output of the AND element is the second output of the refinement block of the approximation series; and the quotient output block comprises a modulo addition block, a demultiplexer, an inverter, a holding register 1 in the ROC, a holding register -1 in the ROC, a quotient multiplexer, a unity multiplexer, and a quotient selection multiplexer, with the first input of the modulo addition block being the fifth input of the output block. private; второй вход блока сложения по модулю подключен к первому выходу демультиплексора, а выход соединен со входом демультиплексора, управляющий вход которого подключен к четвертому входу блока вывода частного, а второй выход - ко второму входу и через инвертор к первому входу мультиплексора частного, выход которого соединен с первым входом мультиплексора выбора частного, второй вход которого соединен с выходом мультиплексора единицы, первый и второй входы которого соединены с регистрами хранения 1 и -1 в СОК соответственно;the second input of the modulo addition block is connected to the first output of the demultiplexer, and the output is connected to the input of the demultiplexer, the control input of which is connected to the fourth input of the quotient output block, and the second output is connected to the second input and through the inverter to the first input of the quotient multiplexer, the output of which is connected to the first input of the private selection multiplexer, the second input of which is connected to the output of the unity multiplexer, the first and second inputs of which are connected to storage registers 1 and -1 in the SOC, respectively; - 10 040463 управляющие входы мультиплексора частного и мультиплексора единицы соединены с первым входом блока вывода частного;- 10 040463 control inputs of the private multiplexer and unity multiplexer are connected to the first input of the private output unit; управляющий вход мультиплексора выбора частного подключен к третьему входу блока вывода частного, отличающееся тем, что пятый выход блока вычисления позиционных характеристик соединен со вторым входом блока уточнения аппроксимационного ряда;the control input of the quotient selection multiplexer is connected to the third input of the quotient output block, characterized in that the fifth output of the positional characteristics calculation block is connected to the second input of the approximation series refinement block; в блок вычисления позиционных характеристик введены первый и второй блоки определения знака; в блоках умножения на константы производится умножение на ортогональные базисы СОК 1 р Pi = ,Ρι = р/рь l/VI где pi Pi - мультипликативная инверсия,in the block for calculating positional characteristics, the first and second blocks for determining the sign are introduced; in blocks of multiplication by constants, multiplication by orthogonal RNS bases is performed 1 р Pi = ,Ρι = р/р l/VI where pi Pi is the multiplicative inversion, P = Πη η 11ί=1 Ιι - рабочий диапазон СОК с модулями p1, p2, ..., pn; в блоках суммирования происходит вычисление функции ядраP = Π η η 11ί=1 Ιι - SOC operating range with modules p1, p 2 , ..., p n ; in the summation blocks, the kernel function is calculated ОД = Е?=1ОД)-ч1Ср, которая подбирается из условия монотонности и отсутствия критических ядер, где Cp=2n - максимальный диапазон функции ядра, а веса wi характеризует конкретную функцию ядра, при этом на выход блоков сложения подаются N младших бит суммы;OD = E?=1OD)-ch1 Cp , which is selected from the condition of monotonicity and the absence of critical kernels, where C p =2 n is the maximum range of the kernel function, and the weights wi characterize a specific kernel function, while N lower ones are fed to the output of the addition blocks sum bit; выходы первого и третьего блоков сложения дополнительно соединены со вторыми входами первого и второго блоков определения знака, первые входы которых соединены с первым и вторым входами блока вычисления позиционных характеристик, а выходы соединены с управляющими входами первого и второго мультиплексоров соответственно, и с первым и вторым входами элемента XOR;the outputs of the first and third addition blocks are additionally connected to the second inputs of the first and second sign determination blocks, the first inputs of which are connected to the first and second inputs of the block for calculating positional characteristics, and the outputs are connected to the control inputs of the first and second multiplexers, respectively, and to the first and second inputs element XOR; первый и второй входы блока вычисления позиционных характеристик дополнительно соединены со вторыми входами первого и второго мультиплексора, четвертые входы которых соединены с выходами первого и второго инверторов;the first and second inputs of the block for calculating positional characteristics are additionally connected to the second inputs of the first and second multiplexers, the fourth inputs of which are connected to the outputs of the first and second inverters; вторые выходы первого и второго мультиплексоров соединены с первым и четвертым входами блока сравнения и четвертым и шестым выходами блока вычисления позиционных характеристик; и в блок уточнения аппроксимационного ряда введен регистр хранения делителя, блок умножения по модулю, демультиплексор, два блока умножения на константу, два блока сложения и блок определения знака, при этом блок отсчета степеней во время прямого отсчета вычисляет максимальную степень частного, а во время обратного отсчета последовательно передает адреса степеней 2 в порядке убывания на первый вход регистра хранения степеней 2, выход которого подключен ко второму входу блока умножения по модулю и второму входу демультиплексора, на управляющий вход которого поступает сигнал со второго выхода блока отсчета степеней, а на первый вход - сигнал с выхода блока умножения по модулю, первый вход которого соединен с выходом регистра хранения делителя, вход которого является третьим входом блока уточнения аппроксимационного ряда, первый вход которого подключен к первому входу регистра хранения уменьшаемого, а второй вход подключен к первому входу блока отсчета степеней;the second outputs of the first and second multiplexers are connected to the first and fourth inputs of the comparison unit and the fourth and sixth outputs of the positional characteristics calculation unit; and a divisor storage register, a modulo multiplication unit, a demultiplexer, two multiplication units by a constant, two addition units and a sign determination unit are introduced into the approximation series refinement unit, while the power reading unit during the direct reading calculates the maximum degree of the quotient, and during the reverse counting sequentially transmits the addresses of degrees 2 in descending order to the first input of the storage register of degrees 2, the output of which is connected to the second input of the modulo multiplication block and the second input of the demultiplexer, the control input of which receives a signal from the second output of the degrees counting block, and to the first input - a signal from the output of the modulo multiplication block, the first input of which is connected to the output of the divider storage register, the input of which is the third input of the approximation series refinement block, the first input of which is connected to the first input of the reduced storage register, and the second input is connected to the first input of the power reading block; третий выход демультиплексора подключен ко входу первого блока умножения на константы, выход которого подключен ко входу первого блока сложения, выход которого подключен ко второму входу блока отсчета степеней;the third output of the demultiplexer is connected to the input of the first unit for multiplying by constants, the output of which is connected to the input of the first addition unit, the output of which is connected to the second input of the power reading unit; выход регистра хранения уменьшаемого подключен к первому входу мультиплексора и первому входу блока вычитания по модулю, выход которого подключен ко входу второго блока умножения на константы и второму входу блока определения знака;the output of the reduced storage register is connected to the first input of the multiplexer and the first input of the modulo subtraction unit, the output of which is connected to the input of the second multiplication unit by constants and the second input of the sign determination unit; выход второго блока умножения на константы подключен ко входу второго блока сложения, выход которого подключен к первому входу блока определения знака, выход которого подключен к управляющему входу мультиплексора и через инвертор к первому входу элемента И, второй вход которого соединен со вторым выходом демультиплексора, первый выход которого подключен ко второму входу блока вычитания по модулю;the output of the second block of multiplication by constants is connected to the input of the second addition block, the output of which is connected to the first input of the sign determination block, the output of which is connected to the control input of the multiplexer and through the inverter to the first input of the AND element, the second input of which is connected to the second output of the demultiplexer, the first output which is connected to the second input of the modulo subtraction block; в блок вывода частного дополнительно введен элемент И, первый вход которого соединен с выходом мультиплексора выбора частного, а второй вход - через инвертор со вторым входом блока вывода частного; и выход элемента И является выходом частного.an additional element is added to the private output unit, the first input of which is connected to the output of the private selection multiplexer, and the second input is connected through an inverter to the second input of the private output unit; and the output of the AND element is the output of the quotient. --
EA202190998 2021-05-11 DEVICE FOR DIVISION OF NUMBERS REPRESENTED IN THE SYSTEM OF RESIDUAL CLASSES EA040463B1 (en)

Publications (1)

Publication Number Publication Date
EA040463B1 true EA040463B1 (en) 2022-06-06

Family

ID=

Similar Documents

Publication Publication Date Title
US6397241B1 (en) Multiplier cell and method of computing
US6847985B1 (en) Floating point divide and square root processor
EP0149248B1 (en) Method and apparatus for division using interpolation approximation
US20070233769A1 (en) A Scalable, Faster Method and Apparatus for Montgomery Multiplication
US8898215B2 (en) High-radix multiplier-divider
US5261001A (en) Microcircuit for the implementation of RSA algorithm and ordinary and modular arithmetic, in particular exponentiation, with large operands
KR100591761B1 (en) Montgomery Modular Multiplication Method Using Montgomery Modular Multiplier and Carry Store Addition
US5023827A (en) Radix-16 divider using overlapped quotient bit selection and concurrent quotient rounding and correction
EP0464493A2 (en) High-radix divider
EP0530936B1 (en) Method and apparatus for performing prescaled division
TWI743237B (en) Apparatuse and testing method thereof, and method for performing recursive operation using lookup table
CN108334304A (en) digital recursive division
EA040463B1 (en) DEVICE FOR DIVISION OF NUMBERS REPRESENTED IN THE SYSTEM OF RESIDUAL CLASSES
RU2318239C1 (en) Neuron network for dividing numbers which are represented in a system of residual classes
US20230086090A1 (en) Methods and Apparatus for Quotient Digit Recoding in a High-Performance Arithmetic Unit
JPH1195982A (en) Circuit, method and system for arithmetic processing
RU2559771C2 (en) Device for primary division of molecular numbers
WO2000038047A1 (en) Circuit and method of cryptographic multiplication
JP6995629B2 (en) Arithmetic circuit
Takagi et al. A VLSI algorithm for computing the Euclidean norm of a 3D vector
Gallagher et al. Fault-tolerant Newton-Raphson and Goldschmidt dividers using time shared TMR
Lang et al. Higher radix square root with prescaling
RU2744815C1 (en) Device for transferring numbers from residue number system and base-radix extensions
US20210064340A1 (en) Arithmetic circuit
RU2559772C2 (en) Device for primary division of molecular numbers in format of remainder class system