RU2131618C1 - Device for module addition of n integers - Google Patents

Device for module addition of n integers Download PDF

Info

Publication number
RU2131618C1
RU2131618C1 RU97120096A RU97120096A RU2131618C1 RU 2131618 C1 RU2131618 C1 RU 2131618C1 RU 97120096 A RU97120096 A RU 97120096A RU 97120096 A RU97120096 A RU 97120096A RU 2131618 C1 RU2131618 C1 RU 2131618C1
Authority
RU
Russia
Prior art keywords
input
elements
output
group
register
Prior art date
Application number
RU97120096A
Other languages
Russian (ru)
Inventor
В.П. Ирхин
Original Assignee
Воронежский государственный университет
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Воронежский государственный университет filed Critical Воронежский государственный университет
Priority to RU97120096A priority Critical patent/RU2131618C1/en
Application granted granted Critical
Publication of RU2131618C1 publication Critical patent/RU2131618C1/en

Links

Images

Landscapes

  • Error Detection And Correction (AREA)

Abstract

FIELD: automation and computer engineering, computing equipment using MODULE notation. SUBSTANCE: device has shift register and encoder. Goal of invention is achieved by introduced table calculation, decoders, group of AND gates. Device provides bit MODULE addition of N integers for ]log2m[ steps (m is MODULE of device operations). Condition ]log2m[ (N-1) provides increased speed of execution of operation. EFFECT: increased speed. 1 dwg, 1 tbl

Description

Изобретение относится к области автоматики и вычислительной техники и может быть использовано в вычислительных структурах, функционирующих в модулярной системе счисления. The invention relates to the field of automation and computer engineering and can be used in computational structures operating in a modular number system.

Известно устройство (аналог) (авт. свид. СССР 1571583, МКИ G 06 F 7/72, Б. И. N 22, 1990), содержащее дешифраторы, группы элементов И, элементы ИЛИ, сумматор по модулю два, элементы И, элементы НЕ, группы элементов ИЛИ, коммутатор, шифраторы. Недостаток устройства - низкое быстродействие выполнения модульной операции. A device (analog) is known (ed. Certificate of the USSR 1571583, MKI G 06 F 7/72, B. I. N 22, 1990), containing decoders, groups of elements And, elements OR, adder modulo two, elements And, elements NOT, element groups OR, switch, encryptors. The disadvantage of this device is the low performance of a modular operation.

Известно также устройство (аналог) (авт. свид. СССР N 1689949, МКИ G 06 F 7/72, Б.И. N 41, 1991 г.), содержащее дешифраторы, два элемента НЕ, элемент ИЛИ-НЕ, три группы элементов ИЛИ, коммутатор, три группы элементов И, шифратор. Недостаток устройства - низкое быстродействие выполнения модульной операции. A device (analogue) is also known (ed. Certificate of the USSR N 1689949, MKI G 06 F 7/72, B.I. N 41, 1991) containing decoders, two elements NOT, an element OR NOT, three groups of elements OR, switch, three groups of elements AND, encoder. The disadvantage of this device is the low performance of a modular operation.

Наиболее близким по технической сущности (прототипом к предлагаемому изобретению) является устройство (авт. свид. СССР N 1599857, МКИ G 06 F 7/72, Б.И. N 38, 1990 г.), содержащее дешифратор, кольцевой регистр сдвига, блоки элементов И, шифратор, элемент запрета, вычитатель по модулю, блок элементов ИЛИ, приемный регистр, схему сравнения и счетчик. Недостаток устройства - низкое быстродействие выполнения модульной операции. The closest in technical essence (prototype to the proposed invention) is a device (ed. Certificate. USSR N 1599857, MKI G 06 F 7/72, B.I. N 38, 1990), containing a decoder, annular shift register, blocks AND elements, encoder, prohibition element, module subtractor, OR element block, receiving register, comparison circuit and counter. The disadvantage of this device is the low performance of a modular operation.

Недостаток прототипа - низкое быстродействие ввиду того, что модульное сложение двух чисел ограничено величиной второго операнда B. Для сложения N чисел требуется Nxm тактов работы. The disadvantage of the prototype is low speed due to the fact that the modular addition of two numbers is limited by the size of the second operand B. To add N numbers, Nxm clock cycles are required.

Задача, на решение которой направлено заявляемое устройство, состоит в повышении производительности перспективных образцов вычислительной техники. The task, which is aimed by the claimed device, is to increase the productivity of promising samples of computer technology.

Технический результат выражается в повышении быстродействия модульной операции сложения. The technical result is expressed in increasing the speed of the modular operation of addition.

Технический результат достигается тем, что в устройство для сложения N чисел по модулю, содержащее основной дешифратор, шифратор, регистр, регистр сдвига, блок элементов И, выход которого соединен со входом шифратора, выход которого является выходом устройства, введены табличный вычислитель, дополнительные дешифраторы, которые вместе с основным дешифратором образуют группу дешифраторов, группа блоков элементов И, причем информационные входы устройства i-ых двоичных разрядов

Figure 00000002
m - модуль устройства j-ых чисел
Figure 00000003
соединены с j-ми входами i-ых дешифраторов группы, выходы которых соединены с первыми входами соответствующих боков элементов И группы, вторые входы которых соединены с выходами соответствующих разрядов регистра сдвига, последний разряд которого соединен с первым входом блока элементов И, а тактовый вход соединен с тактовым входом устройства, выходы блоков элементов И группы соединены с первым входом табличного вычислителя, второй вход которого соединен с выходом регистра, а выход - со вторым входом блока элемента И и входом регистра.The technical result is achieved by the fact that in the device for adding N numbers modulo, containing a main decoder, an encoder, a register, a shift register, a block of AND elements, the output of which is connected to the input of the encoder, the output of which is the output of the device, a table computer, additional decoders, which, together with the main decoder, form a group of decoders, a group of blocks of AND elements, moreover, the information inputs of the device of i-th binary digits
Figure 00000002
m - module of the jth number device
Figure 00000003
connected to the j-th inputs of the i-th decoders of the group, the outputs of which are connected to the first inputs of the respective sides of the elements of the group And the second inputs of which are connected to the outputs of the corresponding bits of the shift register, the last bit of which is connected to the first input of the block of elements AND, and the clock input is connected with the clock input of the device, the outputs of the blocks of elements AND groups are connected to the first input of the table computer, the second input of which is connected to the output of the register, and the output is connected to the second input of the block of the element And and the input of the register.

Сущность изобретения заключается в проведении поразрядного модульного сложения N чисел за ]log2m[ тактов (m - модуль устройства) и при ]log2m[ < (N-1) происходит повышение быстродействия выполнения операции. Представим модульную сумму N двоичных чисел в виде

Figure 00000004

где ηij - соответствующее значение (0 или 1) i-го двоичного разряда числа αj.
Операция, которая заключена в квадратные скобки в выражении (1), реализуется с использованием группы 2 дешифраторов. Заключительная часть модульной операции производится за ]log2m[ на табличном 7 вычислителе. Время проведения операции не зависит от числа слагаемых и определяется величиной модуля m устройства. Дешифраторы 2 группы преобразует код соответствующих i-ых разрядов N чисел в соответствующую модульную сумму (с учетом веса разрядов), представленную в позиционном коде. В частности, при N=5 и m=7 число дешифраторов 2 группы - два и они реализуют таблицу.The essence of the invention is to perform bitwise modular addition of N numbers per] log 2 m [ticks (m is the unit of the device), and when] log 2 m [<(N-1), the operation speed is increased. We represent the modular sum of N binary numbers in the form
Figure 00000004

where η ij is the corresponding value (0 or 1) of the i-th binary digit of the number α j .
The operation, which is enclosed in square brackets in expression (1), is implemented using group 2 decoders. The final part of the modular operation is performed in] log 2 m [on table 7 calculator. The time of the operation does not depend on the number of terms and is determined by the magnitude of the module m of the device. Group 2 decoders converts the code of the corresponding i-th digits of N numbers into the corresponding modular sum (taking into account the weight of the digits), presented in the positional code. In particular, with N = 5 and m = 7, the number of decoders of the 2nd group is two and they implement the table.

Иначе говоря, дешифраторы 2 группы производят преобразование кода числа единиц на входных шинах (с учетом веса разряда) в модульный унитарный код. Эта операция может быть выполнена также на программируемых логических матрицах. Устройство может быть реализовано для любого модуля. Количество входных шин дешифраторов 2 группы равно числу слагаемых N, а выходные шины (число которых - m) скоммутированы так, чтобы выполнялось выражение в квадратных скобках из (1). Табличный 7 вычислитель реализует функцию сложения двух чисел по модулю устройства. Регистр 4 сдвига содержит ]log2m[ разрядов, а регистр 8 - m разрядов.In other words, the decoders of the 2nd group convert the code of the number of units on the input buses (taking into account the weight of the discharge) into a modular unitary code. This operation can also be performed on programmable logic arrays. The device can be implemented for any module. The number of input buses of group 2 decoders is equal to the number of terms N, and the output buses (the number of which is m) are switched so that the expression in square brackets from (1) is satisfied. Table 7 calculator implements the function of adding two numbers modulo the device. Shift register 4 contains] log 2 m [bits, and register 8 contains m bits.

Следует отметить, что для сложения N чисел по модулю при табличном способе требуется (N-1) тактов, а в данном случае нужно ]log2m[ тактов. Если ] log2m[ < (N-1), то быстродействие заявляемого устройства превышает табличный вариант обработки числовой информации. С ростом отношения количества суммируемых чисел по отношению к разности модуля устройства выигрыш в быстродействии нарастает.It should be noted that for adding N numbers modulo with a tabular method, (N-1) clock cycles are required, and in this case it is necessary] log 2 m [clock cycles. If] log 2 m [<(N-1), then the speed of the claimed device exceeds the tabular version of the processing of numerical information. With an increase in the ratio of the number of summed numbers with respect to the difference in the device module, the gain in speed increases.

На чертеже представлена структурная схема устройства, где: 1ij - информационные входы устройства

Figure 00000005
m - модуль устройства; I = [log2m] ; j = 1, N); 2 - группа дешифраторов; 3 - группа блоков элементов И; 4 - регистр сдвига; 5 - блок элементов И; 6 - тактовый вход устройства; 7 - табличный вычислитель; 8 - регистр; 9 - шифратор; 10 - выход устройства.The drawing shows a structural diagram of the device, where: 1 ij - information inputs of the device
Figure 00000005
m is the device module; I = [log 2 m]; j = 1, N); 2 - a group of decoders; 3 - a group of blocks of elements And; 4 - shift register; 5 - block elements And; 6 - clock input of the device; 7 - tabular computer; 8 - register; 9 - encoder; 10 - device output.

Информационные входы 1 устройства i-ых двоичных разрядов i-ых двоичных разрядов

Figure 00000006
m - модуль устройства) j-ых чисел
Figure 00000007
соединены с j-ми входами j-ых дешифраторов 2 группы, выходы которых соединены с первыми входами соответствующих блоков 3 элементов И группы, вторые входы которых соединены с выходами соответствующих разрядов регистра 4 сдвига, последний разряд которого соединен с первым входом блока 5 элементов И, а тактовый вход соединен с тактовым входом 6 устройства, выходы блоков 3 элементов И группы соединены с первым входом табличного 7 вычислителя, второй вход которого соединен с выходом регистра 8, а выход - с входом регистра 8 и вторым входом блока 5 элементов И, выход которого соединен с входом шифратора 9, выход которого является выходом 10 устройства.Information inputs 1 of the device of the i-th binary bits of the i-th binary bits
Figure 00000006
m - device module) of the jth numbers
Figure 00000007
connected to the j-th inputs of the j-th decoders 2 groups, the outputs of which are connected to the first inputs of the corresponding blocks of 3 elements And groups, the second inputs of which are connected to the outputs of the corresponding bits of the register 4 shift, the last bit of which is connected to the first input of the block of 5 elements And, and the clock input is connected to the clock input 6 of the device, the outputs of the blocks of 3 elements And groups are connected to the first input of the table 7 of the calculator, the second input of which is connected to the output of the register 8, and the output is connected to the input of the register 8 and the second input of the block 5 elem entov And, the output of which is connected to the input of the encoder 9, the output of which is the output 10 of the device.

Рассмотрим работу устройства. На информационные входы 1ij устройства поступают двоичные коды N чисел. На N входов нулевого дешифратора 2 группы поступают нулевые разряды N чисел.Consider the operation of the device. The information inputs 1 ij of the device receive binary codes of N numbers. The N inputs of the zero decoder of the 2nd group receive zero bits of N numbers.

На его выходе образуется частичная модульная сумма вида

Figure 00000008
(см (1)), ввиду того, что 2i = 20 = 1. Одновременно, на N входов каждого из оставшихся дешифраторов 2 группы поступают соответствующие двоичные разряды N чисел, образуя на выходах частичные модульные суммы. На выходе [log2m]-го дешифратора 2 группы образуется в унитарном коде число
Figure 00000009

где I = [log2m] . Эти числа поступают на первые входы соответствующих блоков 3 элементов И группы. Первоначально в нулевом разряде регистра 4 сдвига была произведена запись единицы, которая поступает на второй вход нулевого блока 3 элементов И группы и данная частичная модульная сумма в унитарном коде поступает на первый вход табличного 7 вычислителя. В исходном состоянии в регистре 8 записано число ноль в унитарном коде, следовательно на второй вход табличного 7 вычислителя поступает ноль. На первом такте работы производится сложение с нулем. Полученный результат с выхода табличного 7 вычислителя поступает на вход регистра 8 и записывается в унитарном коде. С тактового входа 6 устройства поступает импульс и единица в регистре 4 сдвига смещается на один разряд. На второй вход первого блока 3 элементов И поступает сигнал и частичная модульная сумма с выхода первого дешифратора 2 группы поступает на первый вход вычислителя 7, на второй вход которого поступает число с выхода регистра 8. Происходит модульное сложение двух частичных сумм. Процесс повторяется. Когда единица в регистре 6 сдвига поступает в последний [log2m]-ый разряд, открывается блок 5 элементов И. При этом результат модульного сложения N чисел в унитарном коде поступает на вход шифратора 9, с выхода которого в двоичном коде поступает на выход 10 устройства.At its output, a partial modular sum of the form
Figure 00000008
(see (1)), in view of the fact that 2 i = 2 0 = 1. At the same time, the corresponding binary digits of N numbers arrive at the N inputs of each of the remaining decoders in group 2, forming partial modular sums at the outputs. At the output of the [log 2 m] th decoder of group 2, a number is formed in the unitary code
Figure 00000009

where I = [log 2 m]. These numbers go to the first inputs of the corresponding blocks of 3 elements AND groups. Initially, in the zero bit of shift register 4, a unit was recorded that goes to the second input of the zero block of 3 AND elements and this partial modular sum in the unitary code goes to the first input of table 7 calculator. In the initial state, the register zero contains the number zero in the unitary code, therefore, the second input of the table 7 calculator receives zero. At the first step of operation, addition with zero is performed. The result obtained from the output of table 7 of the calculator is fed to the input of register 8 and is recorded in a unitary code. A pulse is received from the clock input 6 of the device and the unit in the shift register 4 is shifted by one bit. The second input of the first block of 3 elements AND receives a signal and a partial modular sum from the output of the first decoder 2 of the group goes to the first input of the calculator 7, the second input of which receives a number from the output of the register 8. There is a modular addition of two partial sums. The process is repeated. When the unit in the shift register 6 enters the last [log 2 m] -th digit, a block of 5 elements is opened I. At the same time, the result of modular addition of N numbers in the unitary code is input to the encoder 9, the output of which in binary code is output 10 devices.

Рассмотрим пример конкретного выполнения модульного сложения при m=7 и N= 5. Пусть α1 = 3 = 0112, α2 = 6 = 1102, α3 = 5 = 1012, α4 = 2 = 0102, α5 = 1002.Consider an example of a specific implementation of modular addition for m = 7 and N = 5. Let α 1 = 3 = 011 2 , α 2 = 6 = 110 2 , α 3 = 5 = 101 2 , α 4 = 2 = 010 2 , α 5 = 100 2 .

В исходном состоянии нулевой разряд регистра 4 сдвига содержит единицу, остальные разряды - нули, а в регистре 8 записано число ноль в унитарном коде. На информационные входы 1ij устройства поступают двоичные коды пяти чисел. На пять входов нулевого дешифратора 2 группы поступают нулевые разряды пяти чисел, образуя входной код 001012 = 5, на выходе будет число 2 в унитарном коде (см. таблицу). Входной код первого дешифратора 2 группы 010112, выходной - число 6, на входе второго дешифратора 2 группы код 101102, а на выходе - число 5 (см. таблицу). Через открытый нулевой блок 3 элементов И группы число 2 поступает в унитарном коде на первый вход табличного 7 вычислителя. Следует отметить, что коды чисел, поступающие на вход вычислителя 7, - унитарные. На второй вход вычислителя 7 поступает код числа 0. Результат, число 2, поступает с его выхода на запись в регистр 8. С тактового входа 6 устройства поступает импульс и единица в регистре 4 сдвига смещается на один разряд. При этом на первый вход вычислителя поступает число 6 с выхода открытого первого блока 3 элементов И группы, на второй вход вычислителя 7 поступает с регистра 8 код числа 2. С выхода вычислителя 7 результат модульного сложения, равный коду числа 1, записывается в регистр 8. Единица с выхода регистра 4 сдвига поступает на второй вход второго блока 3 элементов И. В этом случае на первый вход вычислителя 7 поступает код числа 5, а на второй вход - код числа 1. На выходе табличного 7 вычислителя будет код числа 6. Результат сложения пяти чисел по модулю семь через открытый блок 5 элементов И и далее через шифратор 9 в виде 1102 поступает на выход 10 устройства. Сложение производится за 3 такта, а в прототипе - за 4 такта. Проверка: (3 + 6 + 5 + 2 +4)mod 7 = 6.1In the initial state, the zero bit of shift register 4 contains one, the remaining bits are zeros, and the number zero in unitary code is written in register 8. The information inputs 1 ij devices receive binary codes of five numbers. The five inputs of the zero decoder 2 groups receive zero bits of five numbers, forming the input code 00101 2 = 5, the output will be the number 2 in the unitary code (see table). The input code of the first decoder 2 of group 01011 2 , the output is the number 6, at the input of the second decoder 2 of the group code 10110 2 , and the output is the number 5 (see table). Through the open zero block of 3 elements AND groups, the number 2 is supplied in a unitary code to the first input of table 7 calculator. It should be noted that the codes of the numbers received at the input of the calculator 7 are unitary. The second input of the calculator 7 receives the code of the number 0. The result, the number 2, is received from its output by writing to the register 8. A pulse is received from the clock input 6 of the device and the unit in the shift register 4 is shifted by one bit. At the same time, the first input of the calculator receives the number 6 from the output of the open first block of 3 elements of the And group, and the second input of the calculator 7 receives the code of the number 2 from register 8. From the output of the calculator 7, the result of modular addition equal to the code of the number 1 is recorded in register 8. The unit from the output of shift register 4 is fed to the second input of the second block of 3 elements I. In this case, the code of number 5 is sent to the first input of calculator 7, and the code of number 1 is sent to the second input. The code of number 6 will be output from table 7 of the calculator. five numbers modulo seven through an open block of 5 elements And and then through the encoder 9 in the form of 110 2 enters the output 10 of the device. Addition is made in 3 measures, and in the prototype - in 4 measures. Check: (3 + 6 + 5 + 2 +4) mod 7 = 6.1

Claims (1)

Устройство для сложения N чисел по модулю, содержащее основной дешифратор, шифратор, регистр сдвига, блок элементов И, выход которого соединен со входом шифратора, выход которого является выходом устройства, отличающееся тем, что в него введены табличный вычислитель, дополнительные дешифраторы, которые вместе с основным дешифратором образуют группу дешифраторов, группа блоков элементов И, причем информационные входы устройства i-х двоичных разрядов
Figure 00000010
m - модуль устройства) j-х чисел
Figure 00000011
соединены с j-ми входами i-х дешифраторов группы, выходы которых соединены с первыми входами соответствующих блоков элементов И группы, вторые входы которых соединены с выходами соответствующих разрядов регистра сдвига, последний разряд которого соединен с первым входом блока элементов И, а тактовый вход соединен с тактовым входом устройства, выходы блоков элементов И группы соединены с первым входом табличного вычислителя, второй вход которого соединен с выходом регистра, а выход - с вторым входом блока элементов И и входом регистра.
A device for adding N numbers modulo containing a main decoder, an encoder, a shift register, a block of AND elements, the output of which is connected to the input of the encoder, the output of which is the output of the device, characterized in that a table computer, additional decoders, which together with the main decoder is a group of decoders, a group of blocks of AND elements, moreover, the information inputs of the i-bit device
Figure 00000010
m - device module) j-th numbers
Figure 00000011
connected to the j-th inputs of i-decoders of the group, the outputs of which are connected to the first inputs of the corresponding blocks of elements AND groups, the second inputs of which are connected to the outputs of the corresponding bits of the shift register, the last bit of which is connected to the first input of the block of elements And, and the clock input is connected with the clock input of the device, the outputs of the blocks of elements AND groups are connected to the first input of the table computer, the second input of which is connected to the output of the register, and the output to the second input of the block of elements AND and the input of the register.
RU97120096A 1997-12-04 1997-12-04 Device for module addition of n integers RU2131618C1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU97120096A RU2131618C1 (en) 1997-12-04 1997-12-04 Device for module addition of n integers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU97120096A RU2131618C1 (en) 1997-12-04 1997-12-04 Device for module addition of n integers

Publications (1)

Publication Number Publication Date
RU2131618C1 true RU2131618C1 (en) 1999-06-10

Family

ID=20199636

Family Applications (1)

Application Number Title Priority Date Filing Date
RU97120096A RU2131618C1 (en) 1997-12-04 1997-12-04 Device for module addition of n integers

Country Status (1)

Country Link
RU (1) RU2131618C1 (en)

Similar Documents

Publication Publication Date Title
RU2131618C1 (en) Device for module addition of n integers
EP0331717B1 (en) Fast multiplier circuit
RU2149442C1 (en) Device for modulo seven multiplication
JP4290203B2 (en) Reduction array apparatus and method
SU1667059A2 (en) Device for multiplying two numbers
SU1003074A1 (en) Device for parallel algebraic adding in sign-digit number system
RU2143722C1 (en) Device for multiplication by modulo 7
RU2018927C1 (en) Modulo 3 adder
RU2192092C1 (en) Device for converting n-digit binary positional code into binary code of modulo m remainder
CN116522967A (en) Multiplier and chip
RU2021630C1 (en) Modulo 3 adder
SU1756887A1 (en) Device for integer division in modulo notation
RU2051406C1 (en) Device for generation of faber-schauder signals
RU2022467C1 (en) Reversible binary-decimal-to-binary code converter
RU2190928C2 (en) Code configuration converter
SU1300462A1 (en) Device for adding
SU1501278A1 (en) Reversible binary-decimal to binary code converter
SU1151948A1 (en) Translazor from residual class system code to positional code
SU1124291A1 (en) Device for multiplying elements of finite fields
RU2092891C1 (en) Adder
SU1626385A1 (en) Device for binary-residue conversion
SU1097995A1 (en) Transformer from binary code to binary-coded decimal code
SU1166103A1 (en) Device for calculating values of trigonometric functions
SU1728858A1 (en) Device for multiplying members of finite field gf(2@@@) at m@@@3
RU2030792C1 (en) Computing device