SU1658388A1 - Device for residue forming according to number modulus - Google Patents
Device for residue forming according to number modulus Download PDFInfo
- Publication number
- SU1658388A1 SU1658388A1 SU884497732A SU4497732A SU1658388A1 SU 1658388 A1 SU1658388 A1 SU 1658388A1 SU 884497732 A SU884497732 A SU 884497732A SU 4497732 A SU4497732 A SU 4497732A SU 1658388 A1 SU1658388 A1 SU 1658388A1
- Authority
- SU
- USSR - Soviet Union
- Prior art keywords
- input
- inputs
- register
- output
- outputs
- Prior art date
Links
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Error Detection And Correction (AREA)
- Complex Calculations (AREA)
Abstract
Изобретение относитс к вычислительной технике. Его использование в системах обработки цифровой информации (например, дл формировани элементов конечных полей) позвол ет повысить быстродействие . Устройство содержит формирователи 2, 3 импульсов, элементы ИЛИ 5, 4, элемент 9 сравнени , вычитатель 10 и регистры 11, 12. Благодар введению счетчика 1, элементов ИЛИ 6-8. регистров 13, 14, элементов И 15-17 и мультиплексора 18 в устройстве реализуетс более быстрый ал- горитм вычислений.1 ил t9The invention relates to computing. Its use in digital information processing systems (for example, to form elements of finite fields) allows for improved performance. The device contains shapers of 2, 3 pulses, elements OR 5, 4, element 9 of comparison, subtractor 10 and registers 11, 12. Thanks to the introduction of counter 1, elements OR 6-8. registers 13, 14, elements 15-17 and multiplexer 18 in the device a faster computation algorithm is implemented. 1 or t9
Description
&&
гоgo
скck
СП 00 00 00 00SP 00 00 00 00
Изобретение относитс к вычислительной технике и может использоватьс в системах обработки цифровой информации, в частности дл формировани элементов конечных полей.The invention relates to computing and can be used in digital information processing systems, in particular, to form elements of finite fields.
Цель изобретени - повышение быстродействи .The purpose of the invention is to increase speed.
На чертеже представлена функциональна схема устройства.The drawing shows the functional diagram of the device.
Устройство содержит счетчик 1, первый и второй формирователи 2 и 3 импульсов, первый - п тый элементы ИЛИ 4-8, элемент 9 сравнени , вычитатель 10, первый - четвертый регистры 11-14, первый - третий элементы И 15 - 17 и мультиплексор 18. На чертеже обозначены информационные входы 19, входы 20 задани модул , вход 21 Начало вычислени , выход 22 Конец вычислени , выходы 23 результата.The device contains a counter 1, the first and second drivers 2 and 3 pulses, the first - the fifth elements OR 4-8, the element 9 comparison, the subtractor 10, the first - the fourth registers 11-14, the first - the third elements 15 And 17 and the multiplexer 18 In the drawing, informational inputs 19, inputs 20 of the module assignment, input 21 Start of calculation, output 22 End of calculation, outputs 23 of the result are indicated.
Принцип работы устройства дл формировани остатка по произвольному модулю от числа заключаетс в реализации следующего алгоритма приведени чисел по модулю .The principle of operation of the device for forming the remainder in an arbitrary modulus of a number is the implementation of the following modulo-numerical algorithm.
Из старших разр дов некоторого числа, поступающего на входы устройства, производитс вычитание кода выбранного модул , если величина числа, образованного этими разр дами, больше величины выбранного модул ; если же оно окажетс меньше, то производитс сдвиг на один разр д в сторону старших разр дов и цикл повтор етс . После вычитани разность записываетс на место уменьшаемого в регистр старших разр дов, производитс сдвиг полученного кода на один разр д в сторону старших разр дов и вс операци повтор етс до тех пор, пока младшие разр ды кода числа не будут сдвинуты в регистр старших разр дов, содержимое которого после записи в него разности последней операции вычитани и будет соответствовать коду результата вычислений, т.е. величине остатка числа по выбранному модулю.From the higher bits of a certain number arriving at the inputs of the device, the code of the selected module is subtracted, if the value of the number formed by these bits is greater than the value of the selected module; if it turns out to be less, then a shift is made to one bit towards the higher bits and the cycle repeats. After subtraction, the difference is written to the place of the decrement in the high-order register, the received code is shifted by one bit towards the high-order bits, and the whole operation is repeated until the lower digits of the number code are shifted to the high-order register, the contents of which after writing the difference of the last subtraction into it will correspond to the code of the result of the calculations, i.e. the magnitude of the remainder of the number of the selected module.
Устройство дл формировани остатка по произвольному модулю от числа работает следующим образом.A device for forming a residue of an arbitrary modulus of the number works as follows.
В исходном состо нии все регистры 11-14 обнулены. Модуль, по которому осуществл етс формирование остатков чисел, задаетс параллельным двоичным кодом, подаваемым на входы 20 устройства. На входы 19 устройства поступает число в параллельном двоичном коде, причем старшие N разр дов поступают на первые входы мультиплексора 18, а младшие М - N разр дов поступают на информационные входы регистра 13, (М - количество разр дов, не- ,обходимое дл представлени в параллельном двоичном коде числа, от которого необходимо сформировать остаток, а N - количество разр дов, необходимое дл представлени в параллельном двоичномIn the initial state, all registers 11-14 are reset. The module by which the formation of residual numbers is carried out is specified by a parallel binary code supplied to the inputs 20 of the device. The inputs 19 of the device receive a number in the parallel binary code, with the older N bits going to the first inputs of the multiplexer 18, and the lower M to N bits to the information inputs of the register 13, (M is the number of bits needed to represent in the parallel binary code of the number from which it is necessary to form the remainder, and N is the number of bits required to represent in the parallel binary
коде модул ). После подачи кодов числа и модул на входы 19 и 20 устройства, на вход 21 Начало вычислени подают импульс, который обнул ет счетчик 1, записывает в регистр 12 код модул , в регистр 13 - млад0 шие разр ды кода числа, а в регистр 14 - старшие разр ды кода числа. Так как на управл ющий вход мультиплексора 18 воздействует нулевой потенциал, то его выходы, подключенные к информационнымcode module). After the codes are supplied, the numbers and the module to the inputs 19 and 20 of the device, to the input 21, the beginning of the calculation is given a pulse, which zeroed the counter 1, wrote the module code into register 12, the lower digit of the code number into register 13, and higher digit code numbers. Since the control input of the multiplexer 18 is affected by a zero potential, its outputs connected to the information
5 входам регистра 14, скоммутированы с его первыми входами. Этот же импульс Начало вычислени , проход через элемент ИЛИ 6, поступает на вход формировател 3 импульсов . По срезу входного импульса (т.е. после5 inputs of the register 14, are connected with its first inputs. The same impulse. The beginning of the calculation, the passage through the element OR 6, is fed to the input of the imager of 3 pulses. By the cut of the input pulse (i.e. after
0 того, как произведена запись кодов чисел и модул в регистры 12 - 14) формирователь 3 импульсов, сформирует импульс, который разрешит сравнение элементов 9 старших N разр дов кода числа, записанных в регистре0 how the codes of numbers and the module are written into registers 12-14) the pulse shaper 3 will generate a pulse that will allow comparison of the elements of the 9 higher N bits of the number code recorded in the register
5 14, и кода модул , записанного в регистр 12. В результате сравнени могут возникнуть три ситуации.5 14, and the module code recorded in register 12. As a result of the comparison, three situations can arise.
а)Код числа, записанного в регистре 14, окажетс меньше кода модул . В этом слу0 чае элемент 9 сравнени выдаст на свой выход Меньше импульс, который, проход через элемент ИЛИ 7, поступает на первый вход элемента И 15, и так как на второй (инверсный) вход элемента И 15 воздейству5 ет нулевой-потенциал с выхода счетчика 1, этот импульс пройдет через элемент И 15 и поступит на входы сдвига регистров 13 и 14. При этом код числа в этих регистрах сдвинетс на один разр д в сторону старшихa) The code of the number written in register 14 will be less than the code of the module. In this case, the comparison element 9 will generate at its output Less impulse, which, passing through the element OR 7, goes to the first input of the element AND 15, and since the second (inverse) input of the element 15 also affects the zero-potential from the output of the counter 1, this pulse will pass through the element 15 and will go to the shift inputs of registers 13 and 14. In this case, the code of the number in these registers will shift by one bit towards the older ones.
0 разр ов (регистр 14 имеет разр дность N + 1), причем в самый младший разр д регистра 14 перепишетс информаци с самого старшего разр да регистра 13. Этот же импульс поступит на счетный вход счетчика0 bits (register 14 has an N + 1 bit), and the youngest bit of register 14 will overwrite the information from the most significant bit of register 13. The same pulse will go to the counting input of the counter
5 1, который сосчитает его, и на второй вход элемента ИЛИ 6. С выхода элемента ИЛИ 6 импульс поступает на вход формировател 3 импульсов, который по срезу входного импульса сформирует следующий импульс дл 5 1, which counts it, and to the second input of the element OR 6. From the output of the element OR 6, a pulse arrives at the input of the pulse shaper 3, which, at the cut of the input pulse, will form the next pulse for
0 разрешени работы элемента 9 сравнени и работа устройства повторитс .0 permitting the operation of reference element 9 and the operation of the device will be repeated.
б)Код числа, записанного в регистре 14, окажетс равен коду модул . В этом случае элемент 9 сравнени выдаст на свой выходb) The code of the number written in register 14 will be equal to the code of the module. In this case, the comparison element 9 will issue at its output
5 Равно импульс, который обнул ет регистр 14 и, проход через элементы ИЛИ 7 и И 15, перепишет информацию с самого старшего разр да регистра 13 в самый младший разр д регистра 14. Этот импульс также сосчитаетс счетчиком 1 и через элемент ИЛИ б5 Equally, the impulse that zeroed the register 14 and the passage through the elements OR 7 and AND 15 will overwrite the information from the most significant register register 13 to the lowest register register 14. This impulse is also counted by counter 1 and through the element OR b
поступает на вход формировател 3 импульсов , который сформирует импульс дл разрешени работы элемента 9 сравнени .It enters the input of the pulse generator 3, which will form a pulse to enable the operation of the comparison element 9.
в) Код числа, записанного в регистре 14, окажетс больше кода модул , В этом случае элемент 9 сравнени выдает на свой выход Больше импульс, который поступает на вход Начало вычитани вычитател 10. При этом вычитатель 10 вычитает из кода числа, записанного в регистре 14, код модул и выдает на свои информационные выходы код разности. Одновременно на выходе Конец вычитани вычитател 10 по вл етс импульс, который устанавливает мультиплексор 18 в состо ние коммутации его выходов со своими вторыми входами. Этот же импульс воздействует через элемент ИЛИ 4 на вход разрешени записи регистра 14. В результате в регистр 14 записываетс код разности с выходов вычитател 10. Импульс Конец вычитани воздействует также на вход формировател 2 импульсов. По срезу входного импульса (т.е. после того, как произойдет запись в регистр 14) формирователь 2 импульсов сформирует импульс, который, проход через элементы ИЛИ 7 и И 15, осуществл ет сдвиг информации в регистрах 14 и 13 в сторону старших разр дов и переписывает информацию с самого старшего разр да регистра 13 в самый младший разр д регистра 14, а также сосчитаетс счетчиком 1 и поступает через элемент ИЛИ 6 на вход формировател 3 импульсов. По срезу входного импульса формирователь 3 импульсов сформирует импульс, который разрешает работу элемента 9 сравнени . Как только счетчик 1 заполнитс (его объем равен M-N). элемент И 15 закроетс и импульсы с выхода элемента 9 сравнени будут поступать по другой цепи. Если при выполнении последней операции сравнени элемент 9 выдаст импульс на свой выход Меньше, то этот импульс, проход через элемент ИЛИ 8 и открытый элемент И 17, поступает на вход разрешени записи регистра 11 и на первый вход элемента ИЛИ 5. При этом в регистр 11 записываетс результат вычислений (т.е. остаток по выбранному модулю от заданного числа), а на выходе элемента ИЛИ 5 по вл етс импульс Конец вычислени , свидетельствующий о том, что формирование остатка закончено, его код записан в выходном регистре 11 и устройство готово к следующему циклу вычислений. Если же элемент 9 сравнени выдаст импульс на свой выход Равно , то этот импульс обнул ет регистр 14, через открытый элемент И 16 поступает на второй вход элемента ИЛИc) The code of the number recorded in register 14 will be greater than the code of the module. In this case, the comparison element 9 gives more output to its output. , the module code and outputs a difference code to its information outputs. At the same time, the output of the subtractor of the subtractor 10 appears at the output. A pulse appears that sets the multiplexer 18 to the state of switching its outputs with its second inputs. The same pulse acts through the OR 4 element on the register write 14 input. As a result, the difference code from the outputs of the subtractor 10 is written to register 14. Pulse The end of the subtract also affects the input of the driver 2 pulses. From the input pulse slice (i.e. after writing to register 14) the pulse shaper 2 will generate a pulse which, passing through the elements OR 7 and AND 15, shifts the information in registers 14 and 13 towards the higher bits and rewrites the information from the most significant bit of register 13 to the least significant bit of register 14, and is also counted by counter 1 and fed through the element OR 6 to the input of the driver 3 pulses. By cutting the input pulse, the pulse former 3 will generate a pulse that permits operation of the reference element 9. As soon as counter 1 is filled (its volume is equal to M-N). element 15 will close and pulses from the output of reference element 9 will flow through another circuit. If during the last comparison operation, element 9 gives a pulse to its output Less, then this pulse, the passage through the element OR 8 and the open element AND 17, goes to the input of register 11 recording and to the first input of the element OR 5. At the same time, in register 11 the result of the calculation is written (i.e., the remainder of the selected module from the specified number), and the output of the element OR 5 appears pulse. The end of the calculation indicates that the formation of the residue is complete, its code is written in the output register 11 and the device is ready for follow his calculation cycle. If the comparison element 9 generates a pulse at its output Equals, then this pulse zeroes the register 14, through the open element AND 16 enters the second input of the element OR
5 и обнул ет выходной регистр 11. На выходе 22 по вл етс импульс Конец вычислени . При этом остаток от заданного числа по выбранному модулю будет тождественно5 and zeroes the output register 11. At output 22, a pulse appears. End of calculation. In this case, the remainder of a given number of the selected module will be identical
равен нулю. А если же элемент 9 сравнени выдаст импульс на свой выход Больше, то этот импульс разрешает вычитание кода модул из кода числа, записанного в регистре 14, разность будет записана в регистр 14, иequals zero. And if the comparison element 9 gives an impulse to its output More, then this impulse allows subtraction of the module code from the code of the number recorded in register 14, the difference will be recorded in register 14, and
далее под воздействием импульса, сформированного формирователем 2 импульсов и прошедшего через элемент ИЛИ 8, и открытый элемент И 17 эта разность будет записана в выходной регистр 11. На выходе 22further, under the influence of a pulse formed by the shaper of 2 pulses and transmitted through the element OR 8, and the open element AND 17, this difference will be written into the output register 11. At the output 22
по вл етс импульс Конец вычислени , свидетельствующий о том, что на выходах 23 сформирован остаток от заданного числа по выбранному модулю, и устройство готово к следующему циклу вычислений, при котором может быть выбран любой другой модуль и задано любое другое число.a pulse appears. End of calculation, indicating that the outputs of the 23 formed the remainder of the specified number for the selected module, and the device is ready for the next cycle of calculations, in which any other module can be selected and any other number specified.
Технико-экономическа эффективность рассматриваемого устройства заключаетс в повышении быстродействи формировани остатка по произвольному модулю от числа. Так, например, при разр дности числа М и разр дности модул N известное устройство затратит (2M/2N).t единиц времени , где t - сумма времени, необходима The technical and economic efficiency of the device in question is to increase the speed of formation of the remainder in an arbitrary modulus of the number. So, for example, when the size of the number M and the width of the module N is known, the device will spend (2M / 2N) .t time units, where t is the sum of the time required
дл срабатывани элемента сравнени , вычитател и дл записи данных в регистр. Рассматриваемое устройство осуществл ет- формирование остатка от числа по выбранному модулю за (М - N). t единиц времени.to trigger the compare item, the subtractor, and to write the data to the register. The considered device performs the formation of the remainder of the number on the selected module for (M - N). t units of time.
Счита величину t примерно одинаковой в обоих случа х, оценим выигрыш В в быстродействии предлагаемого устройства, по сравнению с известным.Considering the value of t is approximately the same in both cases, we estimate the gain B in the speed of the proposed device as compared with the known.
В AT
2м N2m N
,М -N, M -N
(М-N) t M-N(Mn) t Mn
5five
00
5five
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU884497732A SU1658388A1 (en) | 1988-10-25 | 1988-10-25 | Device for residue forming according to number modulus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU884497732A SU1658388A1 (en) | 1988-10-25 | 1988-10-25 | Device for residue forming according to number modulus |
Publications (1)
Publication Number | Publication Date |
---|---|
SU1658388A1 true SU1658388A1 (en) | 1991-06-23 |
Family
ID=21405715
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU884497732A SU1658388A1 (en) | 1988-10-25 | 1988-10-25 | Device for residue forming according to number modulus |
Country Status (1)
Country | Link |
---|---|
SU (1) | SU1658388A1 (en) |
-
1988
- 1988-10-25 SU SU884497732A patent/SU1658388A1/en active
Non-Patent Citations (1)
Title |
---|
Авторское свидетельство СССР № 1105895,кл. G 06 F 11/08, 1983. Авторское свидетельство СССР № 1575186, кл.С 06 F 11/10.22.09.88. Авторское свидетельство СССР N: 1396281. кл Н 03 М 7/18, 1986. * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
SU1658388A1 (en) | Device for residue forming according to number modulus | |
RU2029434C1 (en) | Device for formation of remainder by arbitrary modulus of number | |
SU524312A1 (en) | Pulse delay device | |
SU436352A1 (en) | DEVICE FOR FINDING THE RELATIONSHIP OF TWO NUMBER OF PULSE CODES | |
RU2157589C1 (en) | Modulo-n remainder driver | |
SU1396281A1 (en) | Device for forming random-modulo remainder of a number | |
RU1837401C (en) | Device for forming arbitrary modulo residue | |
SU1262519A1 (en) | Device for logical processing of information | |
SU1765825A1 (en) | Zero counting device | |
SU450153A1 (en) | Code rate converter | |
SU378854A1 (en) | DIGITAL SENSOR NORMALLY DISTRIBUTED NUMBERS | |
SU1372344A1 (en) | Device for receiving discrete signals | |
RU2007034C1 (en) | Device for generation of indexes of members of multiplicative groups from galois fields gf(p) | |
SU1080136A1 (en) | Multiplying device | |
SU1168948A1 (en) | Device for detecting errors in parallel n-digit code | |
RU2011220C1 (en) | Device for determination of duration of computing experiment which runs on computer | |
SU1647871A1 (en) | Threshold gate | |
SU1387016A1 (en) | Digital filter | |
SU922765A1 (en) | Device for determining probability distribution laws | |
SU1550531A1 (en) | Device for performing operations on polynominals for ultimate purposes | |
SU1718215A1 (en) | Device to perform vector-scalar operations over real numbers | |
SU732946A1 (en) | Stochastic converter | |
SU1734212A1 (en) | Device for computing of modulo @@@+1 reminder | |
SU1683012A1 (en) | Device for modulo adding and subtracting numbers | |
SU1720165A1 (en) | Device for receiving discrete signals in memory channels |