RU2018930C1 - Device for modulo n adding of seven numbers - Google Patents
Device for modulo n adding of seven numbers Download PDFInfo
- Publication number
- RU2018930C1 RU2018930C1 SU5048197A RU2018930C1 RU 2018930 C1 RU2018930 C1 RU 2018930C1 SU 5048197 A SU5048197 A SU 5048197A RU 2018930 C1 RU2018930 C1 RU 2018930C1
- Authority
- RU
- Russia
- Prior art keywords
- adder
- input
- bit
- output
- digit
- Prior art date
Links
Images
Landscapes
- Error Detection And Correction (AREA)
Abstract
Description
Изобретение относится к вычислительной технике и микроэлектронике и может быть использовано при построении устройств, работающих в системе остаточных классов. The invention relates to computing and microelectronics and can be used in the construction of devices operating in a system of residual classes.
Известен сумматор по модулю семь, содержащий элементы сложения по модулю два, ИЛИ-НЕ, И, ИЛИ [1]. Known adder modulo seven, containing elements of addition modulo two, OR NOT, AND, OR [1].
Недостатком сумматора являются низкие функциональные возможности, так как он не выполняет операцию сложения по различным модулям. The disadvantage of the adder is its low functionality, since it does not perform the addition operation on various modules.
Наиболее близким по функциональным возможностям и конструкции техническим решением к предлагаемому является сумматор по модулю 2n-1, содержащий в каждом разряде элементы ИЛИ, И, ИЛИ-НЕ, РАВНОЗНАЧНОСТЬ и НЕРАВНОЗНАЧНОСТЬ [2].The closest in functionality and design technical solution to the proposed one is an adder modulo 2 n -1, containing in each category the elements OR, AND, OR-NOT, UNIVERSALITY, AND UNAIGNIFICANCE [2].
Недостатком известного сумматора по модулю 2n-1 являются низкие функциональные возможности, поскольку он не обеспечивает сложение по модулю более двух операндов.The disadvantage of the known adder modulo 2 n -1 are low functionality, since it does not add modulo more than two operands.
На чертеже представлена схема устройства для сложения и вычитания семи чисел по модулю 2n-1 при n = 5.The drawing shows a diagram of a device for adding and subtracting seven numbers modulo 2 n -1 at n = 5.
Устройство содержит n = 5 семивходовых одноразрядных сумматоров 11... 15, n = =5 одноразрядных двоичных сумматоров 21...25, сумматор 3 двух чисел по модулю 2n - 1 = 31, входы j-го (j=) операнда с первого по пятый (n-1) разряд соответственно 4j..8j, n = 5 выходов 91...95 результата.The device contains n = 5 seven-input single-bit adders 1 1 ... 1 5 , n = = 5 single-bit
В общем случае устройство для сложения и вычитания семи чисел по модулю 2n-1 содержит сумматор двух чисел по модулю 2n-1, n одноразрядных двоичных сумматоров и n семивходовых одноразрядных сумматоров, j=й (j=) вход i-го (i= ) из которых соединен с входом i-го разряда j-го операнда. Первый вход i-го одноразрядного двоичного сумматора соединен с выходом суммы i-го семивходового одноразрядного сумматора, второй вход k-го (k=) одноразрядного двоичного сумматора - с выходом младшего переноса (k+1)-го семивходового одноразрядного сумматора, третий вход l-го (l=) одноразрядного двоичного сумматора - с выходом старшего переноса (l+2)-го семивходового одноразрядного сумматора, второй вход n-го одноразрядного двоичного сумматора - с выходом младшего переноса первого семивходового одноразрядного сумматора, третий вход (n+h-2)-го (h = 1, 2) одноразрядного двоичного сумматора - с выходом старшего переноса h-го семивходового одноразрядного сумматора, выход суммы i-го одноразрядного двоичного сумматора - с первым входом i-го разряда сумматора двух чисел по модулю 2n-1, второй вход k-го разряда которого соединен с выходом переноса (k+1)-го одноразрядного двоичного сумматора. Выход переноса первого одноразрядного двоичного сумматора соединен с вторым входом n-го разряда сумматора двух чисел по модулю 2n-1, выход -го разряда которого соединен с выходом i-го разряда устройства.In general, a device for adding and subtracting seven numbers modulo 2 n -1 contains an adder of two numbers modulo 2 n -1, n single-digit binary adders and n seven-input single-digit adders, j = th (j = ) input of the i-th (i = ) of which is connected to the input of the i-th category of the j-th operand. The first input of the i-th single-bit binary adder is connected to the output of the sum of the i-th seven-input single-bit adder, the second input of the k-th (k = ) single-bit binary adder - with the lowest transfer output of the (k + 1) -th seven-input single-bit adder, the third input of the l-th (l = ) a single-bit binary adder - with the output of the senior transfer of the (l + 2) -th seven-input single-bit adder, the second input of the n-th single-bit binary adder - with the output of the least transfer of the first seven-input single-bit adder, the third input of the (n + h-2) -th ( h = 1, 2) a single-bit binary adder - with the highest transfer output of the h-seven-input single-bit adder, the output of the sum of the i-th single-bit binary adder - with the first input of the i-th bit of the adder of two numbers modulo 2 n -1, the second input k whose discharge is connected to you the transfer progress of the (k + 1) -th single-bit binary adder. The transfer output of the first one-bit binary adder is connected to the second input of the nth discharge of the adder of two numbers modulo 2 n -1, the output of the ith discharge of which is connected to the output of the ith discharge of the device.
Устройство для сложения и вычитания семи чисел по модулю 2n-1 при n = 5 работает следующим образом.A device for adding and subtracting seven numbers modulo 2 n -1 with n = 5 works as follows.
На входы 4j. ..8j поступают соответственно разряды с первого по пятый xj1. ..xj5 j-го (j=) операнда Xj = 16xj1 + 8xj2 + 4xj3 + 2xj4 + +xj5. На выходах 91. ..95 формируются значения соответственно разрядов с первого по пятый r1...r5 результата R = 16r1 + 8r2 + 4r3 + 2r4 + r5(суммы по модулю 2n - 1 = 31 семи входных операндов, которые могут иметь различные знаки). При этом R= Xmod31, и Xj ∈ {0, 1,...,31}, R ∈ {0, 1,..,30}, xj5 ∈ {0, 1}, rs∈ { 0, 1 },j=, s=.At the
Если некоторый операнд Xj суммируется с отрицательным знаком, то на входы 4j...8j подаются соответственно инверсные значения его разрядов: . .., т.е. на входы 4j...8j поступает обратный код операнда Xj.If some operand X j is summed with a negative sign, then the inverse values of its bits are supplied to the
Семивходовые одноразрядные сумматоры 11...15, входящие в состав заявляемого устройства, формируют позиционный двоичный код числа единиц, присутствующих на их входах. При подаче на входы такого сумматора двоичных переменных z1, z2,...,z7 на его выходах формируются сигналы суммы f0, младшего переноса f1 и старшего переноса f2. При этом
z1 + z2 +...+ z7 = 4f2 + 2f1 + f0.Seven-input single-digit adders 1 1 ... 1 5 , which are part of the inventive device, form a positional binary code of the number of units present at their inputs. When applied to the inputs of the adder binary variables z 1, z 2, ..., z 7 formed at its outputs the sum signal f 0, f 1 Jr. transfer and transfer older f 2. Wherein
z 1 + z 2 + ... + z 7 = 4f 2 + 2f 1 + f 0 .
Структуры семивходовых одноразрядных сумматоров известны. Например, семивходовый одноразрядный сумматор по авт. св. СССР N 1592846, кл. G 06 F 7/50, 1988, имеет простую конструкцию и высокое быстродействие. The structures of seven-input single-bit adders are known. For example, a seven-input single-digit adder according to ed. St. USSR N 1592846, class G 06 F 7/50, 1988, has a simple design and high speed.
Сумматор 3 по модулю 2n-1 выполняет сложение двух полных операндов. В качестве такого сумматора может быть использовано устройство-прототип из [2].The
Рассмотрим работу предлагаемого устройства на примере выполнения следующей операции сложения-вычитания по модулю тридцать один (n = 5) семи операндов Х1, Х2,..,Х7:
R= (-X1-X2+X3-X4+X5-X6-X7)mod31 при Х1 = 10010, Х2 = 01010, Х3 = 11111, Х4 = =11011, Х5 = 11101, Х6 = 10010, Х7 = 00100.Consider the operation of the proposed device on the example of the following addition-subtraction operation modulo thirty-one (n = 5) of the seven operands X 1 , X 2 , .., X 7 :
R = (-X 1 -X 2 + X 3 -X 4 + X 5 -X 6 -X 7 ) mod31 with X 1 = 10010, X 2 = 01010, X 3 = 11111, X 4 = 11011, X 5 = 11101, X 6 = 10010, X 7 = 00100.
Следовательно, на входы 41, 42,...,47 поступают соответственно первые разряды операндов Х1, Х2,...,Х7:
(, , x31, , x51, , )=(0110101), на входы 51, 52,...,57 поступают соответственно вторые разряды операндов Х1, Х2,...,Х7:
(, , x32, , x52, , )=(1010111), на входы 61, 62,...,67 поступают соответственно третьи разряды операндов Х1, Х2,...,Х7:
(, , x33, , x53, , )=(1111110), на входы 71, 72,...,77 поступают соответственно четвертые разряды операндов Х1, Х2,...,Х7:
(, , x34, , x54, , )=(0010001), на входы 81, 82,...,87 поступают соответственно пятые разряды операндов Х1, Х2,...,Х7:
(, , x35, , x55, , )=(1110111).Therefore, the
( , , x 31 , , x 51 , , ) = (0110101), to input 5 1, 5 2, ... 5 7 receives the second level respectively operands X 1, X 2, ..., X 7:
( , , x 32 , , x 52 , , ) = (1010111), the inputs of 6 1 , 6 2 , ..., 6 7 respectively receive the third bits of the operands X 1 , X 2 , ..., X 7 :
( , , x 33 , , x 53 , , ) = (1111110), to the inputs 7 1, 7 2, ..., 7, 7 respectively come fourth operand bits X 1, X 2, ..., X 7:
( , , x 34 , , x 54 , , ) = (0010001), to ports 8 1, 8 2, ..., 8 respectively receives 7 bits fifth operands X 1, X 2, ..., X 7:
( , , x 35 , , x 55 , , ) = (1110111).
На выходах первого семивходового одноразрядного сумматора 11формируются значения функций f2 = 1, f1 = 0, f0 = 0, на выходах второго семивходового одноразрядного сумматора 12 - значения функций f2 = 1, f1= 0, f0 = 1, на выходах третьего семивходового одноразрядного сумматора 13 - значения функций f2 = 1, f1 = 1, f0 = 0, на выходах четвертого семивходового одноразрядного сумматора 14 - значения функций f2 = 0, f1= 1, f0 = 0, на выходах пятого семивходового одноразрядного сумматора 15- значения функций f2 = 1, f1 = 1, f0 = 0.At the outputs of the first seven-input single-bit adder 1 1 , the values of the functions f 2 = 1, f 1 = 0, f 0 = 0 are formed, at the outputs of the second seven-input single-bit adder 1 2 , the values of the functions f 2 = 1, f 1 = 0, f 0 = 1, at the outputs of the third seven-input single-bit adder 1 3 - the values of the functions f 2 = 1, f 1 = 1, f 0 = 0, at the outputs of the fourth seven-input single-bit adder 1 4 - the values of the functions f 2 = 0, f 1 = 1, f 0 = 0, at the outputs of the fifth seven-input single-bit adder 1 5 - the values of the functions f 2 = 1, f 1 = 1, f 0 = 0.
На выходах первого одноразрядного двоичного сумматора 21 сигналы переноса р = 0 и сигналы суммы s = 1, на выходах второго одноразрядного двоичного сумматора 22 сигналы переноса р = 1 и сигналы суммы s = 0, на выходах третьего одноразрядного двоичного сумматора 23 сигналы переноса р = 1 и сигналы суммы s = 0, на выходах четвертого одноразрядного двоичного сумматора 24 сигналы переноса р = 1 и сигналы суммы s = 0, на выходах пятого одноразрядного двоичного сумматора 25 сигналы переноса р = 0 и сигналы суммы s = =1.At the outputs of the first one-bit
Тогда на входы 101...105 сумматора 3 по модулю тридцать один поступает двоичный код 10000, на входы 111...115 - двоичный код 11101. На выходах 91. ..95 сумматора 3 формируются разряды результата r1...r5соответственно:
(10000 + 11101) mod31 = 01110.Then, the
(10000 + 11101) mod31 = 01110.
Таким образом,
R = (-X1 - X2 + X3 - X4 + X5 - X6 - X7)mod31 = =(-10010 - 01010 + 11111 - 11011 +
+ 11101 - 10010 - 00100)mod31 = 01110.In this way,
R = (-X 1 - X 2 + X 3 - X 4 + X 5 - X 6 - X 7 ) mod31 = = (- 10010 - 01010 + 11111 - 11011 +
+ 11101 - 10010 - 00100) mod31 = 01110.
В десятичной системе счисления
R = (-X1 - X2 + X3 - X4 + X5 - X6 - X7)mod31= = (-18 - 10 + 31 - 27 + 29 - 18 - 4)mod31 =
=(-17)mod31 = (31 - 17)mod31 = 14.In decimal notation
R = (-X 1 - X 2 + X 3 - X 4 + X 5 - X 6 - X 7 ) mod31 = = (-18 - 10 + 31 - 27 + 29 - 18 - 4) mod31 =
= (- 17) mod31 = (31 - 17) mod31 = 14.
Достоинством предлагаемого устройства для сложения и вычитания семи чисел по модулю 2n-1 являются широкие функциональные возможности и высокое быстродействие, определяемое малой глубиной схемы.The advantage of the proposed device for adding and subtracting seven numbers modulo 2 n -1 is its wide functionality and high speed, determined by the shallow depth of the circuit.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU5048197 RU2018930C1 (en) | 1992-06-17 | 1992-06-17 | Device for modulo n adding of seven numbers |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU5048197 RU2018930C1 (en) | 1992-06-17 | 1992-06-17 | Device for modulo n adding of seven numbers |
Publications (1)
Publication Number | Publication Date |
---|---|
RU2018930C1 true RU2018930C1 (en) | 1994-08-30 |
Family
ID=21607247
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU5048197 RU2018930C1 (en) | 1992-06-17 | 1992-06-17 | Device for modulo n adding of seven numbers |
Country Status (1)
Country | Link |
---|---|
RU (1) | RU2018930C1 (en) |
-
1992
- 1992-06-17 RU SU5048197 patent/RU2018930C1/en active
Non-Patent Citations (2)
Title |
---|
1. Авторское свидетельство СССР N 1603371, кл. G 06F 7/49, опублик.1990. * |
2. Авторское свидетельство СССР N 1156063, кл. G 06F 7/50, опублик.1985. * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5465226A (en) | High speed digital parallel multiplier | |
US6240438B1 (en) | Multiplier circuit for reducing the number of necessary elements without sacrificing high speed capability | |
FI862883A (en) | KRETS FOER KOMPLEMENTERING AV BINAERA TAL. | |
RU2018930C1 (en) | Device for modulo n adding of seven numbers | |
EP0326414B1 (en) | High speed multiplier | |
WO1991000568A1 (en) | Conditional-sum carry structure compiler | |
JP2600591B2 (en) | Multiplier | |
RU2018926C1 (en) | Modulo n adder | |
RU2018929C1 (en) | Device for modulo n addition of three numbers | |
SU1322265A1 (en) | Multiplying device | |
SU1575172A1 (en) | Four-channel one-digit adder | |
SU1716506A1 (en) | Logarithmic-to-binary code converter | |
SU807276A1 (en) | Adding device | |
SU1213477A1 (en) | Optronic modulo p adder | |
SU1291973A1 (en) | Dividing device | |
SU1179322A1 (en) | Device for multiplying two numbers | |
SU981992A1 (en) | Adder in m from n code | |
SU1019441A1 (en) | Binary-decimal adder | |
SU1608647A1 (en) | Device for dividing golden proportion parallel codes by two | |
SU1223224A1 (en) | Device for dividing n-digit numbers | |
SU1228099A1 (en) | Four-input single-digit adder | |
RU2047897C1 (en) | DEVICE FOR ADDITION AND SUBTRACTION OF N INTEGERS BY MODULO 2n-1 | |
SU1024910A1 (en) | Matrix computing device | |
RU2018924C1 (en) | Modulo 7 adder | |
SU1737446A1 (en) | Modulo ferma numbers adder |