RU2018930C1 - Device for modulo n adding of seven numbers - Google Patents

Device for modulo n adding of seven numbers Download PDF

Info

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
Application number
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 SU5048197 priority Critical patent/RU2018930C1/en
Application granted granted Critical
Publication of RU2018930C1 publication Critical patent/RU2018930C1/en

Links

Images

Landscapes

  • Error Detection And Correction (AREA)

Abstract

FIELD: computer technology; microelectronics. SUBSTANCE: device has n seven-input single-digit adders, n single-digit binary adders, modulo 2n-1 adder of two numbers, inputs of seven operands from the first to the nth digit, n outputs of the result. The first to the nth digits of seven operands Xj enter inputs of the adder. Values of n-digit result R (modulo 2n-1 sum of seven input operands, which may have different sings) are formed at outputs of the adder. In this case
Figure 00000003
, R ∈ {0, 1, ..., 2n-2} and if some operand Xj is added to negative sign, it enters inputs of the device in form of reverse code. EFFECT: wide functional capabilities; simplified design; high speed of operation. 1 dwg

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=

Figure 00000004
) операнда с первого по пятый (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 binary adders 2 1 ... 2 5 , an adder 3 of two numbers modulo 2 n - 1 = 31, inputs of the jth (j =
Figure 00000004
) operand from the first to the fifth (n-1) category, respectively 4 j ..8 j , n = 5 outputs 9 1 ... 9 5 results.

В общем случае устройство для сложения и вычитания семи чисел по модулю 2n-1 содержит сумматор двух чисел по модулю 2n-1, n одноразрядных двоичных сумматоров и n семивходовых одноразрядных сумматоров, j=й (j=

Figure 00000005
) вход i-го (i=
Figure 00000006
) из которых соединен с входом i-го разряда j-го операнда. Первый вход i-го одноразрядного двоичного сумматора соединен с выходом суммы i-го семивходового одноразрядного сумматора, второй вход k-го (k=
Figure 00000007
) одноразрядного двоичного сумматора - с выходом младшего переноса (k+1)-го семивходового одноразрядного сумматора, третий вход l-го (l=
Figure 00000008
) одноразрядного двоичного сумматора - с выходом старшего переноса (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 =
Figure 00000005
) input of the i-th (i =
Figure 00000006
) 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 =
Figure 00000007
) 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 =
Figure 00000008
) 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=

Figure 00000009
) операнда Xj = 16xj1 + 8xj2 + 4xj3 + 2xj4 + +xj5. На выходах 91. ..95 формируются значения соответственно разрядов с первого по пятый r1...r5 результата R = 16r1 + 8r2 + 4r3 + 2r4 + r5(суммы по модулю 2n - 1 = 31 семи входных операндов, которые могут иметь различные знаки). При этом R=
Figure 00000010
X
Figure 00000011
mod31, и Xj ∈ {0, 1,...,31}, R ∈ {0, 1,..,30}, xj5 ∈ {0, 1}, rs∈ { 0, 1 },j=
Figure 00000012
, s=
Figure 00000013
.At the inputs 4 j . ..8 j the first to fifth digits x j1 arrive respectively. ..x j5 of the jth (j =
Figure 00000009
) operand X j = 16x j1 + 8x j2 + 4x j3 + 2x j4 + + x j5 . At the outputs 9 1 . ..9 5 the values of the first to fifth digits r 1 ... r 5 of the result are formed R = 16r 1 + 8r 2 + 4r 3 + 2r 4 + r 5 (the sum modulo 2 n - 1 = 31 of the seven input operands which may have different signs). Moreover, R =
Figure 00000010
X
Figure 00000011
mod31, and X j ∈ {0, 1, ..., 31}, R ∈ {0, 1, .., 30}, x j5 ∈ {0, 1}, r s ∈ {0, 1}, j =
Figure 00000012
, s =
Figure 00000013
.

Если некоторый операнд Xj суммируется с отрицательным знаком, то на входы 4j...8j подаются соответственно инверсные значения его разрядов:

Figure 00000014
. ..
Figure 00000015
, т.е. на входы 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 inputs 4 j ... 8 j :
Figure 00000014
. ..
Figure 00000015
, i.e. inputs 4 j ... 8 j receive the reverse code of the operand X j .

Семивходовые одноразрядные сумматоры 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 adder 3 modulo 2 n -1 performs the addition of two full operands. As such an adder, a prototype device from [2] can be used.

Рассмотрим работу предлагаемого устройства на примере выполнения следующей операции сложения-вычитания по модулю тридцать один (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:
(

Figure 00000016
,
Figure 00000017
, x31,
Figure 00000018
, x51,
Figure 00000019
,
Figure 00000020
)=(0110101), на входы 51, 52,...,57 поступают соответственно вторые разряды операндов Х1, Х2,...,Х7:
(
Figure 00000021
,
Figure 00000022
, x32,
Figure 00000023
, x52,
Figure 00000024
,
Figure 00000025
)=(1010111), на входы 61, 62,...,67 поступают соответственно третьи разряды операндов Х1, Х2,...,Х7:
(
Figure 00000026
,
Figure 00000027
, x33,
Figure 00000028
, x53,
Figure 00000029
,
Figure 00000030
)=(1111110), на входы 71, 72,...,77 поступают соответственно четвертые разряды операндов Х1, Х2,...,Х7:
(
Figure 00000031
,
Figure 00000032
, x34,
Figure 00000033
, x54,
Figure 00000034
,
Figure 00000035
)=(0010001), на входы 81, 82,...,87 поступают соответственно пятые разряды операндов Х1, Х2,...,Х7:
(
Figure 00000036
,
Figure 00000037
, x35,
Figure 00000038
, x55,
Figure 00000039
,
Figure 00000040
)=(1110111).Therefore, the inputs 4 1 , 4 2 , ..., 4 7 respectively receive the first bits of the operands X 1 , X 2 , ..., X 7 :
(
Figure 00000016
,
Figure 00000017
, x 31 ,
Figure 00000018
, x 51 ,
Figure 00000019
,
Figure 00000020
) = (0110101), to input 5 1, 5 2, ... 5 7 receives the second level respectively operands X 1, X 2, ..., X 7:
(
Figure 00000021
,
Figure 00000022
, x 32 ,
Figure 00000023
, x 52 ,
Figure 00000024
,
Figure 00000025
) = (1010111), the inputs of 6 1 , 6 2 , ..., 6 7 respectively receive the third bits of the operands X 1 , X 2 , ..., X 7 :
(
Figure 00000026
,
Figure 00000027
, x 33 ,
Figure 00000028
, x 53 ,
Figure 00000029
,
Figure 00000030
) = (1111110), to the inputs 7 1, 7 2, ..., 7, 7 respectively come fourth operand bits X 1, X 2, ..., X 7:
(
Figure 00000031
,
Figure 00000032
, x 34 ,
Figure 00000033
, x 54 ,
Figure 00000034
,
Figure 00000035
) = (0010001), to ports 8 1, 8 2, ..., 8 respectively receives 7 bits fifth operands X 1, X 2, ..., X 7:
(
Figure 00000036
,
Figure 00000037
, x 35 ,
Figure 00000038
, x 55 ,
Figure 00000039
,
Figure 00000040
) = (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 binary adder 2 1 , the transfer signals p = 0 and signals of the sum s = 1, at the outputs of the second one-bit binary adder 22, the transfer signals p = 1 and signals of the sum s = 0, at the outputs of the third one-bit binary adder 2 3 transfer signals p = 1 and signals of the sum s = 0, at the outputs of the fourth single-bit binary adder 2 4 transfer signals p = 1 and signals of the sum s = 0, at the outputs of the fifth single-bit binary adder 2 5 transfer signals p = 0 and signals of the sum s = = 1.

Тогда на входы 101...105 сумматора 3 по модулю тридцать один поступает двоичный код 10000, на входы 111...115 - двоичный код 11101. На выходах 91. ..95 сумматора 3 формируются разряды результата r1...r5соответственно:
(10000 + 11101) mod31 = 01110.
Then, the inputs 10 1 ... 10 5 of the adder 3 modulo thirty-one receive the binary code 10000, the inputs 11 1 ... 11 5 - the binary code 11101. At the outputs 9 1 . ..9 5 adder 3 is formed by the digits of the result r 1 ... r 5 respectively:
(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)

УСТРОЙСТВО ДЛЯ СЛОЖЕНИЯ И ВЫЧИТАНИЯ СЕМИ ЧИСЕЛ ПО МОДУЛЮ 2n-1, содержащее сумматор двух чисел по модулю 2n - 1, выход i-го (i=
Figure 00000041
) разряда которого соединен с выходом i-го разряда устройства, отличающееся тем, что содержит n одноразрядных двоичных сумматоров и n семивходовых одноразрядных сумматоров, j-й (j=
Figure 00000042
) вход i-го из которых соединен с входом i-го разряда j-го операнда, первый вход i-го одноразрядного двоичного сумматора соединен с выходом суммы i-го семивходового одноразрядного сумматора, второй вход k-го (k=
Figure 00000043
) одноразрядного двоичного сумматора соединен с выходом младшего переноса (k + 1)-го семивходового одноразрядного сумматора, третий вход l-го (l=
Figure 00000044
) одноразрядного двоичного сумматора соединен с выходом старшего переноса (l + 2)-го семивходового одноразрядного сумматора, второй вход n-го одноразрядного двоичного сумматора соединен с выходом младшего переноса первого семивходового одноразрядного сумматора, третий вход (n + h - 2)-го (h = 1, 2) одноразрядного двоичного сумматора соединен с выходом старшего переноса h-го семивходового одноразрядного сумматора, выход суммы i-го одноразрядного двоичного сумматора соединен с первым входом i-го разряда сумматора двух чисел по модулю 2n - 1, второй вход k-го разряда которого соединен с выходом переноса (k + 1)-го одноразрядного двоичного сумматора, выход переноса первого одноразрядного двоичного сумматора соединен с вторым входом n-го разряда сумматора двух чисел по модулю 2n - 1.
DEVICE FOR ADDING AND SUBTRACTING SEVEN NUMBERS MODULE 2 n -1, containing the adder of two numbers modulo 2 n - 1, the output of the i-th (i =
Figure 00000041
) the discharge of which is connected to the output of the i-th discharge of the device, characterized in that it contains n single-digit binary adders and n seven-input single-digit adders, j-th (j =
Figure 00000042
) the input of the i-th of which is connected to the input of the i-th bit 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 =
Figure 00000043
) a single-bit binary adder connected to the output of the lowest transfer of the (k + 1) -th seven-input single-bit adder, the third input of the l-th (l =
Figure 00000044
) a single-bit binary adder is connected to 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 is connected to 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) one-digit binary adder coupled to an output transfer older semivhodovogo h-th one-bit adder, the sum output i-th one-bit binary adder coupled to the first input of the i-th digit of the adder of two numbers modulo 2 n - 1, the second Rin d k-th bit of which is connected to the carry output (k + 1) -th one-bit binary adder, the output transfer of the first one-bit binary adder coupled to the second input of the n-th digit of the adder of two numbers modulo 2 n - 1.
SU5048197 1992-06-17 1992-06-17 Device for modulo n adding of seven numbers RU2018930C1 (en)

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)

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
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