SU1636844A1 - Device for modulo addition and subtraction - Google Patents
Device for modulo addition and subtraction Download PDFInfo
- Publication number
- SU1636844A1 SU1636844A1 SU894678674A SU4678674A SU1636844A1 SU 1636844 A1 SU1636844 A1 SU 1636844A1 SU 894678674 A SU894678674 A SU 894678674A SU 4678674 A SU4678674 A SU 4678674A SU 1636844 A1 SU1636844 A1 SU 1636844A1
- Authority
- SU
- USSR - Soviet Union
- Prior art keywords
- elements
- input
- inputs
- block
- output
- Prior art date
Links
Landscapes
- Complex Calculations (AREA)
Abstract
Изобретение относитс к автоматике и вычислительной технике и может быть использовано в вычислительных машинах и устройствах, функционирующих в системе остаточных классов. Цель изобретени - расширение функциональных возможностей за счет получени результата операции модульного умножени . Цель достигаетс за счет формировани величины и знака сдвигаThe invention relates to automation and computing and can be used in computers and devices operating in the system of residual classes. The purpose of the invention is to expand the functionality by obtaining the result of a modular multiplication operation. The goal is achieved by shaping the magnitude and sign of the shift
Description
вэ±ve ±
СЕ) 00 (35 00CE) 00 (35 00
Let Let
11eleven
кольцевого сдвигающего регистра 17 дл операции умножени путем введени в устройство, содержащее первый 2 и второй 10 дешифраторы, с первого по третий блоки 4, 7 и 16 элементов И, вычитатель 5, первый блок 9 элементов ИЛИ, приемный регистр 11, счетчик 12, схему 13 сравнени , первый 14 и второй 15 элементы запрета,annular shift register 17 for the multiplication operation by introducing into the device containing the first 2 and second 10 decoders, first to third blocks 4, 7 and 16 elements AND, subtractor 5, first block 9 elements OR, receiving register 11, counter 12, circuit 13 comparisons, the first 14 and the second 15 prohibition elements,
кольцевой сдвигающий регистр 17, первый 18 и второй 19 элементы И, пер , вый элемент ИЛИ 20,- элемент НЕ 22, первый шифратор 24 и группу элементов ИЛИ 25, второго шифратора 26, второго 33 и третьего 31 элементов : ИЛИ 33 и 31, второго блока 29 элементов ИЛИ, четвертого 27 и п тогоring shifting register 17, the first 18 and second 19 elements AND, the first, the second element OR 20, - the element NOT 22, the first encoder 24 and the group of elements OR 25, the second encoder 26, the second 33 and the third 31 elements: OR 33 and 31, second block 29 elements OR, fourth 27 and p
10 г- 6локов ЭЛЈментов И. 4 табл., 1 ил.10 g- 6lokov Elentov I. 4 tab., 1 Il.
Изобретение относитс к автоматике и вычислительной технике и может быть использовано в вычислительных машинах и устройствах, функционирующих в системе остаточных классов. The invention relates to automation and computing and can be used in computers and devices operating in the system of residual classes.
Цель изобретени - расширение фун- кциональных возможностей за счет получени результата операции модульного умножени .The purpose of the invention is to expand the functional capabilities by obtaining the result of a modular multiplication operation.
На чертеже представлена схема устройства дл сложени и вычитани чисел по модулю.The drawing shows a diagram of a device for adding and subtracting numbers modulo.
Устройство содержит первый информационный вход 1 устройства, первый дешифратор 2, втброй информационный вход 3 устройства, первый блок 4 элементов И, вычитатель 5, вход 6 задани модул устройства, второй блок 7 элементов И, вход 8 задани вычитани устройства, первый блок 9 элементов ИЛИ, второй дешифратор 10, приемный регистр 11, счетчик 12, схему 13 срав нени , первый элемент 14 запрета, второй элемент 15 запрета, третий блок 16 элементов И, кольцевой сдвигающий регистр 7, первый элемент И 18, второй элемент И 19, первый элемент ИЛИ 20, тактовый вход 21 устройства , элемент НЕ 22, выход 23 устройства , первый шифратор 24, группу элементов ИЛИ 25, второй четвертый блок 27The device contains the first information input 1 of the device, the first decoder 2, the input information input 3 of the device, the first block 4 of the elements AND, the subtractor 5, the input 6 of the device module assignment, the second block 7 of the elements AND, the input 8 of the device subtraction, the first block 9 of the elements OR , the second decoder 10, the receiving register 11, the counter 12, the comparison circuit 13, the first prohibition element 14, the second prohibition element 15, the third block 16 And elements, the ring shift register 7, the first And 18 element, the second And 19 element, the first element OR 20, clock input 21 devices Real estate, element NOT 22, device output 23, first encoder 24, group of elements OR 25, second fourth block 27
п тый блок 28 элементов И, второй i 29 элементов ИЛИ, вход 30 задани сложени устройства, третий элемент ИЛИ 31, вход 32 задани умножени устройства , второй элемент ИЛИ 33.the fifth block 28 elements AND, the second i 29 elements OR, the input 30 sets the device addition, the third element OR 31, the input 32 sets the device multiplication, the second element OR 33.
шифратор 26-р- элементов И9 ,encoder 26-p- elements I9,
Рассмотрим работу устройства в трех режимах. При проэедении операции модульного, сложени , (A+B)modm в двоичнрм коде на вход 1 поступает операнд А, на вход 3 - операнд В, который также поступает на вход вычита- тел 5 (по модулю т), на выходе кото5Consider the operation of the device in three modes. When modular operation, addition, (A + B) modm in binary code is performed, input 1 receives operand A, input 3 receives operand B, which also enters input of subtractor 5 (modulo t), output
5five
00
чh
Q Q
00
5 five
00
рого получают значение (m-В). Сигнал с входа 30 проходит через элемент ИЛИ 33 и открывает первый блок 4 эле- ментов И, через который и через первый блок 9 элементов ИЛИ операнд В поступает на вход второго дешифратора 10, С выхода второго дешифратора 10 операнд В в унитарном коде поступает на первую группу входов первого шифратора 24, на вторую группу входов которого поступает через первый дешифратор 2 операнд А. В зависимости от соотношени операндов А и В на выходах элементов ИЛИ 25 группы образуетс двоичное число, соответствующее количеству сдвигов регистра 17, а на выходе элемента ИЛИ 20 образуетс сигнал , если направление сдвига правое (т.к. сигнал на выходе элемента ИЛИ 31 присутствует, то открыт четвертый блок 27 элементов И). Сигнал с выхода элемента ИЛИ 20 поступает на первый вход элемента И 18, а если сигнал отсутствует, то открываетс элемент И 19, обеспечива левое направление сдвига. С входа 21 на входы открытыхч Элементов 14 и 15 запрета поступают им- J пульсы. При совпадении состо ний счетчика 12 и приемного регистра 11 схема 13 сравнени выдает сигнал, который закрывает элементы 14 и 15 запрета и открывает блок 16 элементов И, через который значение группы двоичных разр дов регистра 17 (результат операции модульного сложени ) поступает на выход 23 устройства.pogo get value (m-b). The signal from input 30 passes through the element OR 33 and opens the first block of 4 elements AND, through which and through the first block 9 elements OR operand B arrives at the input of the second decoder 10, From the output of the second decoder 10 operand B in the unitary code goes to the first the group of inputs of the first encoder 24, to the second group of inputs of which is fed through the first decoder 2 operand A. Depending on the ratio of operands A and B, a binary number is formed at the outputs of the OR elements of group 25, corresponding to the number of register shifts 17, and The OR 20 signal forms a signal if the shift direction is right (since the signal at the output of the OR element 31 is present, then the fourth block 27 of the AND elements is open). The signal from the output of the element OR 20 enters the first input of the element AND 18, and if there is no signal, then the element AND 19 opens, providing the left direction of the shift. From the entrance 21 to the openings of the Elements 14 and 15 of the prohibition, pulses arrive. When the states of the counter 12 and the receiving register 11 coincide, the comparison circuit 13 generates a signal that closes the inhibit elements 14 and 15 and opens a block of 16 AND elements, through which the value of the bit group of the register 17 (the result of the modular addition operation) enters the device output 23 .
Пусть необходимо определить результат (A-B)modm. В этом случае сигнал с входа 8 поступает на второй блок 7 элементов И. С выхода вычитател 5 значение (т-8) через открытый второй блок 7 элементов И, блок 9 элементов (ИЛИ поступает на второй дешифратор -1 10. Дальнейша работа устройства анаLet it be necessary to determine the result (A-B) modm. In this case, the signal from input 8 goes to the second block 7 of the elements I. From the output of the subtractor 5, the value (t-8) through the open second block 7 of the elements is AND, the block of 9 elements (OR goes to the second decoder -1 10. Further operation of the device
логична определению результата операции модульного сложени . logical to determine the result of the modular addition operation.
Если определ ют результат (А tB)modm, то присутствует сигнал на входе 30, который открывает первый блок 4 элементов И и п тый блок 28 элементов И. В этом случае на входы элементов ИЛИ 25 группы и первого элемента ИЛИ 20 информаци поступает с выходов второго шифратора 26 через п тый блок 28 элементов И и второй блЗк 29 элементов ИЛИ. Дальнейша работа аналогична определению результата операции модульного сложени .If the result (A tB) modm is determined, then a signal is present at input 30, which opens the first block 4 of the AND elements and the fifth block of the 28 I elements. In this case, the inputs of the OR 25 group and the first OR 20 elements receive information from the outputs the second encoder 26 through the fifth block of 28 AND elements and the second block 29 of the OR elements. Further work is similar to determining the result of a modular addition operation.
Рассмотрим примеры конкретного выполнени операции модульного сложени вычитани и умножени дл .Consider examples of the specific implementation of the operation of modular addition of subtraction and multiplication for.
Исходное состо ние регистра 17: 1-0- 1- 1-0-0-0. Первые три двоичных разр да соответствуют числу 5й. Число 3 соответствует сдвигу регистра 17 влево на один двоичный разр д. 2 - вправо на один двоичныйThe initial state of the register is 17: 1-0-1-0-0-0. The first three bits correspond to the number 5. The number 3 corresponds to the shift of the register 17 to the left by one binary digit. 2 - to the right by one binary
разр д и т.д. Составим таблицу дл ре-25 ментов И поступает на выход 23. Этоbit, etc. Make a table for re-25 cops And goes to exit 23. This
ализации операции модульного сложени , В табл. 1 отражены результаты операции модульного сложени .Allocation of modular operation, Table. 1 shows the results of the modular addition operation.
В табл. 2 дл построени шифратора 24 отражено необходимое количество тактов сдвига дл каждой пары операн- . дов А и В и направление сдвига, Сдвиг влево соответствует положительному направлению сдвига и отражен в табл. 2 знаком +.In tab. 2 for building the encoder 24, the necessary number of shift cycles for each pair of operand is reflected. Dov A and B and the direction of shift, Shift to the left corresponds to the positive direction of shift and is reflected in the table. 2 sign +.
Составим таблицу дл реализации операции модульного умножени . В табл.3 отражены результаты операции модульного умножени .Create a table to implement the modular multiplication operation. Table 3 shows the results of the modular multiplication operation.
В табл. 4 дл построени шифратора 26 отражено необходимое количество тактов сдвига дл каждой пары операн- дов и направлени сдвига., In tab. 4, to construct the encoder 26, the required number of shift cycles for each pair of operands and the shift direction is reflected.
Следовательно, группа элементов ИЛИ 25, выполн юща функцию шифратора , состоит из двух элементов, которые формируют четыре числа: 00, 01,, 11. В элементе ИЛИ-20 объедин ютс выходы шифратора 24, либо шифратора 26, которые поме.че- ны знаком - соответственно в . . табл. 2 и 4. Consequently, the group of elements OR 25, which performs the function of the encoder, consists of two elements that form four numbers: 00, 01, 11. 11. The OR-20 element combines the outputs of the encoder 24, or the encoder 26, which are sign - respectively, in. . tab. 2 and 4.
Пример 1. , . Необходимо определить (A+B)modm. Первый опе ,есть результат операции.Example 1.,. You must define (A + B) modm. The first is the result of the operation.
Пример 2. , , Необходи- мо определить (A-Sjmodm. В этом слу- чае на первый вход второй группы пер- 30 вого шифратора 24 поступает сигнал. На шестой вход первой группы входов первого шифратора 24 также поступает- сигнал () ./ В приемном регистре 11 будет записано число 00. Сигнал с выхода элемента ИЛИ 20 не поступает , а схема 13 сравнени в момент . включени устройства вырабатывает сигнал , закрывающий элементы 14 и 15 запрета и открывающий блок 16 элементов И, (сдвиг не происходит). Состо ние регистра 17 будет следующее:Example 2.,, It is necessary to determine (A-Sjmodm. In this case, the first input of the second group of the first 30 encoder 24 receives a signal. The sixth input of the first group of inputs of the first encoder 24 also receives a signal () ./ In the receiving register 11, the number 00 will be recorded. The signal from the output of the element OR 20 is not received, and the comparison circuit 13 at the moment of turning on the device generates a signal closing the prohibition elements 14 and 15 and the opening block 16 of the elements AND, (no shift). register 17 will be as follows:
3535
4040
II
.L.L
I-0-I-I-0-0-0I-0-I-I-0-0-0
33
Содержимое первых трех двоичных 45 разр дов регистра 17 представл ет результат операции модульного вычитани .The contents of the first three binary 45 bits of register 17 represent the result of the modular subtraction operation.
ПримерЗ. , . Необходимо определить (AXB)modm. Первый операнд поступает на первый дешифра- 50 тор 2, с выхода которого поступает на третий вход второй группы входов второго шифратора 26, Операнд В через четвертый блок 4 элементов И (сигнал на выходе ИЛИ 33 присутствует) ранд поступает на первый дешифра- 55 и первый блок 9 элементов ИЛИ через тор 2, с входа которого поступает навторой дешифратор 10 поступает на четпервый вход второй группы входов шиф- вертый вход .первой группы входов вто- ратора 24. Операнд В через первый .рого шифратора 26. В приемном регистблок 4 элементов И и первый блок 9ре 11 будет записано число 10 сог0Example , It is necessary to define (AXB) modm. The first operand arrives at the first decoder 50 tor 2, from the output of which arrives at the third input of the second group of inputs of the second encoder 26, Operand B through the fourth block of 4 elements AND (the output signal OR 33 is present) the rand arrives at the first decoder 55 and first block 9 elements OR through torus 2, from the input of which the second decoder 10 enters the fourth input of the second group of inputs, the encrypted input of the first group of inputs of the second 24. Operand B through the first encoder 26. In the receiving register of 4 elements AND and the first block 9re 11 bu dat recorded number 10 sog0
0 0
элементов ИЛИ поступает на второй дешифратор 10. С выхода второго дешифратора 10 поступает на третий вход первой группы входов шифратора 24. В приемном регистре I1 будет записано число 01 согласно табл. 2 (сигналом с выхода ИЛИ 31 открыт четвертый блок 27 элементов И). Сигнал с выхода элемента ИЛИ 20 не поступает, а на(элемент И 19 поступает сигнал. Импульсы через открытые элементы 14 и 15 запрета поступают на регистр 17 и на счетчик 12. В момент совпадени состо ни 5 регистра 11 и счетчика 12 (в счетчикеelements OR goes to the second decoder 10. From the output of the second decoder 10 goes to the third input of the first group of inputs of the encoder 24. In the receiving register I1, the number 01 will be written according to the table. 2 (the signal from the output OR 31 opened the fourth block 27 of the elements AND). The signal from the output of the element OR 20 is not received, but the (element AND 19 signal is received. The pulses through the open elements 14 and 15 of the prohibition go to register 17 and to counter 12. At the moment of coincidence of state 5 of register 11 and counter 12 (in the counter
12содержитс значение 01) схема12 contains the value 01) scheme
13сравнени , формирует сигнал, закрывающий элементы 14 и 15 запрета и открывающий третий блок 16 элементов И. Состо ние регистра 17 будет следукщее:13 compares the signal that closes the prohibition elements 14 and 15 and opens the third block 16 of elements I. The register state 17 will be as follows:
с1c1
0-1-00-1-0
I - I - 0 - ОтI - I - 0 - From
Содержание первых трех розр дов регистра 17 через третий блок 16 эле ,есть результат операции.The contents of the first three rosters of register 17, through the third block of 16 ae, is the result of the operation.
Пример 2. , , Необходи- мо определить (A-Sjmodm. В этом слу- чае на первый вход второй группы пер- вого шифратора 24 поступает сигнал. На шестой вход первой группы входов первого шифратора 24 также поступает- сигнал () ./ В приемном регистре 11 будет записано число 00. Сигнал с выхода элемента ИЛИ 20 не поступает , а схема 13 сравнени в момент . включени устройства вырабатывает сигнал , закрывающий элементы 14 и 15 запрета и открывающий блок 16 элементов И, (сдвиг не происходит). Состо ние регистра 17 будет следующее:Example 2.,, It is necessary to determine (A-Sjmodm. In this case, the first input of the second group of the first encoder 24 receives a signal. The sixth input of the first group of inputs of the first encoder 24 also receives a signal () ./V the receiving register 11 will be recorded with the number 00. The signal from the output of the element OR 20 is not received, and the comparison circuit 13 at the moment of turning on the device generates a signal closing the prohibition elements 14 and 15 and the opening block 16 of the elements AND, (no shift). Register 17 will be the following:
II
.L.L
I-0-I-I-0-0-0I-0-I-I-0-0-0
33
Содержимое первых трех двоичных разр дов регистра 17 представл ет результат операции модульного вычитани .The contents of the first three bits of register 17 represent the result of the modular subtraction operation.
ПримерЗ. , . Необходимо определить (AXB)modm. Первый операнд поступает на первый дешифра- тор 2, с выхода которого поступает на третий вход второй группы входов второго шифратора 26, Операнд В через четвертый блок 4 элементов И (сигласно табл. 4 (сигнал присутствует на втором входе п того блока 28 элементов И).Example , It is necessary to define (AXB) modm. The first operand arrives at the first decoder 2, from the output of which arrives at the third input of the second group of inputs of the second encoder 26, Operand B through the fourth block of 4 AND elements (according to Table 4 (the signal is present at the second input of the fifth block of 28 AND elements) .
Сигнал с выхода элемента ИЛИ 20 поступает на вход элемента И 18, Импульсы через открытые элементы 14 и 15 запрета поступают на регистр 17 и на счетчик 12, В момент совпадени состо ни регистра 11 и счетчика 32 (в,счетчике содержитс значение 10) схема 13 сравнени формирует сигнал, закрывающий элементы 14 и 15 запретна и открывающий блок 16 элементов И. Состо ние регистра 17 будет следующее:The signal from the output of the element OR 20 enters the input of the element AND 18, The pulses through the open elements 14 and 15 of the prohibition are fed to the register 17 and to the counter 12, When the state of the register 11 and the counter 32 coincides (in, the counter contains the value 10) Comparison generates a signal closing the elements 14 and 15 is forbidden and the opening unit 16 of the elements I. The state of the register 17 will be as follows:
QJQJ
1-0-0-01-0-0-0
оabout
DD
Содержание первых трех разр дов регистра 17 и есть результат операции JQ модульного умножени .The content of the first three bits of register 17 is the result of the modular multiplication operation JQ.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU894678674A SU1636844A1 (en) | 1989-04-11 | 1989-04-11 | Device for modulo addition and subtraction |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU894678674A SU1636844A1 (en) | 1989-04-11 | 1989-04-11 | Device for modulo addition and subtraction |
Publications (1)
Publication Number | Publication Date |
---|---|
SU1636844A1 true SU1636844A1 (en) | 1991-03-23 |
Family
ID=21441645
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU894678674A SU1636844A1 (en) | 1989-04-11 | 1989-04-11 | Device for modulo addition and subtraction |
Country Status (1)
Country | Link |
---|---|
SU (1) | SU1636844A1 (en) |
-
1989
- 1989-04-11 SU SU894678674A patent/SU1636844A1/en active
Non-Patent Citations (1)
Title |
---|
Авторское свидетельство СССР № 1120325, кн. G 06 F 7/72, 1983. Авторское свидетельство СССР № 1532923, JOT. G 06 F 7/72, 1988. * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
SU1636844A1 (en) | Device for modulo addition and subtraction | |
SU1532923A1 (en) | Device for addition and subtraction of numbers by modulo | |
SU1756881A1 (en) | Modulo arithmetic unit | |
SU1599857A1 (en) | Device for adding and subtracting numbers by modulo | |
SU1451690A1 (en) | Modulo-m adding and subtracting device | |
SU1683011A1 (en) | Device for modulo three adding and subtracting numbers | |
SU1633399A1 (en) | Device for numberъs moduli summation and subtraction | |
SU1388850A1 (en) | Device for modulo p addition and subtraction of numbers | |
SU959068A1 (en) | Device for multiplicating by modulus | |
SU1552171A1 (en) | Device for comparison of numbers in residual classes system | |
SU843215A1 (en) | Decoding storage | |
SU1266008A1 (en) | Converter of binary code to binary-coded decimal code of angular units | |
SU1043639A1 (en) | One-bit binary subtractor | |
SU1667055A1 (en) | Device for modulo m multiplication | |
RU1820379C (en) | Modulo n subtracting and summing device | |
SU1416982A1 (en) | Analyzer of spectrum in orthogonal basis | |
SU1483450A1 (en) | Modulo adder-subtractor | |
SU1432784A1 (en) | Converter of binary code to residual class system code | |
SU1084749A1 (en) | Device for tolerance checking of pulse sequences | |
SU1257643A1 (en) | Device for modulo p adding and subtracting of numbers | |
RU2199774C1 (en) | Programmable device for controlling electric drives, electronic switches, and signaling facilities | |
SU1401448A1 (en) | Apparatus for implementing boolean symmetrical functions | |
SU1188728A1 (en) | Device for implementing boolean functions | |
SU842798A1 (en) | Adding and subtracting device | |
SU1095178A1 (en) | Device for multiplying modulo p numbers |