SU1280616A1 - Device for squaring numbers - Google Patents
Device for squaring numbers Download PDFInfo
- Publication number
- SU1280616A1 SU1280616A1 SU853863975A SU3863975A SU1280616A1 SU 1280616 A1 SU1280616 A1 SU 1280616A1 SU 853863975 A SU853863975 A SU 853863975A SU 3863975 A SU3863975 A SU 3863975A SU 1280616 A1 SU1280616 A1 SU 1280616A1
- Authority
- SU
- USSR - Soviet Union
- Prior art keywords
- input
- output
- counter
- argument
- control unit
- Prior art date
Links
Landscapes
- Complex Calculations (AREA)
- Executing Machine-Instructions (AREA)
Abstract
Изобретение относитс к вычислительной технике и может быть использовано дл аппаратной реализации операции вычислени квадратной функции в универсальных и специализированных вычислител х. Изобретение позвол ет выполн ть итерационное возведение в квадрат аргумента с увеличением быстродействи устройства при уменьшении величины его приращени . Работа устройства основана на следующих рекурсивных выражени х: у(х+1)y(x)+h(x); h(x+1)h(x)+2; уThe invention relates to computing and can be used for the hardware implementation of the operation of calculating a square function in universal and specialized computers. The invention allows iterative squaring of the argument with an increase in the speed of the device while decreasing its increment value. The operation of the device is based on the following recursive expressions: y (x + 1) y (x) + h (x); h (x + 1) h (x) +2; at
Description
11281128
Изобретение относитс к вычислительной технике и может быть использовано дл . аппаратной реап изации операции вычислени квадратной функции в универсальных и специализированных вычислител х.The invention relates to computing and can be used for. hardware reconfiguration of the operation of calculating a square function in universal and specialized calculators.
Целью изобретени вл етс повышение быстродействи устройства.The aim of the invention is to improve the speed of the device.
На фиг.1 показана функциональна схема предлагаемого устройства; на фиг.2 - граф-схема алгоритма работы блока управлени (ГСА).Figure 1 shows the functional diagram of the device; Fig. 2 is a flow chart of the operation of the control unit (GAW).
Устройство содержит схему 1 сравThe device contains a circuit 1
нени , счетчик 2, мультиплексор 3, накапливающий сумматор 4, первый и второй элементы И 5 и 6, блок 7 управлени , вход 8 аргумента, выход 9 результата и шины 10-12, причем схема 1 сравнени и мультиплексор 3 вл ютс устройствами комбинационного типа, счетчик 2 и накапливающий сумматор 4 - синхронного типа, а блок управлени 7 реализован в виде микропрограммного устройства.counter 2, multiplexer 3, accumulating adder 4, first and second elements 5 and 6, control block 7, argument 8 input, output 9 and bus 10-12, the comparison circuit 1 and multiplexer 3 being combination type devices , the counter 2 and the accumulating adder 4 are of the synchronous type, and the control unit 7 is implemented in the form of a firmware.
Принцип работы устройства основан на вычислении квадратичной функции, представленной в виде следующих рекуррентных соотношений:The principle of operation of the device is based on the calculation of the quadratic function, presented in the form of the following recurrence relations:
y(X+1)y(X)+h(x); (1) h(x+1)h(x)+2; (2) y(x)y(X+1)-h(x); (3) h(x)h(x+1)-2. (4) Начальные услови у(0)0; h(0)1, У(Х), yCX+D - значени функции на предыдущем и последующем шагах вычислени ; h(x), h(x+1) - значени приращений функций на предыдущем и последующем шагах вычислени .y (X + 1) y (X) + h (x); (1) h (x + 1) h (x) +2; (2) y (x) y (X + 1) -h (x); (3) h (x) h (x + 1) -2. (4) Initial conditions (0) 0; h (0) 1, Y (X), yCX + D are the values of the function in the previous and subsequent calculation steps; h (x), h (x + 1) are the values of the increments of the functions in the previous and subsequent calculation steps.
Очевидно, что выражени (3) и (4) вл ютс следствием соответствующих выражений (1) и (2).It is obvious that expressions (3) and (4) are a consequence of the corresponding expressions (1) and (2).
Условием окончани вычислительного процесса вл етс равенство значений кода входного аргумента X иThe condition for terminating the computational process is the equality of the code values of the input argument X and
При поступлении данных на вход 8 аргумента с входа 13 запуска устройства поступает единичный сигнал , по которому четвертый выход блока 7 управлени переходит в нулевое состо ние, сигнал готовности данных RA становитс равным нулю (вершина 18 ГСА), а блок 7 управлени переходит в режим проверки единичного сигнала равенства данных , поступающего с третьего выхода схемы 1 5 сравнени (вершина 19 ГСА). При выполнении этого услови , т.е. равенства входного кода аргумента X, поступающего с входа 8, со значением выходного кода счетчика 2, на четвертомWhen data is received at the input 8 of the argument from the input 13 of the device launch, a single signal is received, according to which the fourth output of the control unit 7 goes to the zero state, the data readiness signal RA becomes equal to zero (GSA vertex 18), and the control unit 7 goes to the test mode a single data equality signal coming from the third output of the comparison circuit 1 5 (vertex 19 GSA). If this condition is met, i.e. the equality of the input code of the argument X, coming from the input 8, with the value of the output code of the counter 2, on the fourth
2020
2525
30thirty
3535
4040
выходе схемы 7 управлени , а следовательно , и на выходе 14 готовности результата устанавливаетс единичный сигнал (вершина 16 ГСА). В противном случае блок 7 управлени вырабатывает на втором и третьем выходах последовательность импульсных сигналов С1 и С2 (вершины 20-22 ГСА), инициализирующих вычислительный процесс до выполнени услови (вершина 19 ГСА).The output of the control circuit 7 and, consequently, a single signal (vertex 16 HSU) is set at the output 14 of the result readiness. Otherwise, the control unit 7 generates at the second and third outputs a sequence of pulsed signals C1 and C2 (vertices 20-22 of GSA), initializing the computational process before the condition is satisfied (vertex 19 GSA).
Вычислительный процесс происходит следующим образом.The computational process is as follows.
Если значение входного кода аргумента X больше выходного кода счетчика 2, т.е. , то на выходе больше схемы 1 сравнени будет сформирован единичный сигнал, по которому пр мые выходы счетчика 2 через первые информационные входы мультиплексора 3 подключатс к N-1 старшим разр дам информационного входа накапливающего сумматора 4, а элемент И 5 разрешит прохождение тактирующих импульсов С2 на суммирующий входIf the value of the input code of the argument X is greater than the output code of counter 2, i.e. , then a single signal will be formed at the output greater than the comparison circuit 1, according to which the direct outputs of counter 2 through the first information inputs of multiplexer 3 are connected to N-1 most significant bits of information input of accumulating adder 4, and element 5 will allow C2 pulses to pass through summing entry
кода с выхода реверсивного счетчика2, 45 счетчика 2. По тактирующему импульсу Устройство работает следующим об- С1 в накапливающем сумматоре 4 будетthe code from the output of the reversible counter 2, 45 of the counter 2. According to the clocking impulse, the device operates as follows C-1 in the accumulating adder 4
сформирован результат следующего значени функции в соответствии с выраразом .the result of the next value of the function is generated in accordance with the expression.
Исходное состо ние устройства задаетс единичным сигналом , При этом блок 7 управлени вырабатывает на первом выходе единичный импульсный сигнал сброса R (вершины 15 и 16 ГСА), по которому счетчик 2 и накапливающий сумматор 4 переход т в нулевое состо ние, тактирующие импульсы С1 и С2 с второго и третьего выходов станов тс равными нулю, а на выход готовности результата 14 с четвертого выхода поступает единич жением (1). По тактирующему импульсу 50 С2 в счетчик 2 запншест единица, котора с учетом смещени разр дной сетки данных счетчика 2 относительно накапливающего сумматора 4 и единицы в его младшем информационном разр де 55 образует выражение (2), используемое на следующем шаге вычислени функции. Если значение входного кода аргумента X меньше выходного кода счетчика 2, т.е. , то нулевым сигнаньш сигнал готовности . Устройство переходит в режим ожидание сигнала пуска (вершина 17 ГСА).The initial state of the device is set by a single signal. At that, the control unit 7 generates at the first output a single pulse signal R (vertices 15 and 16 GSA), according to which the counter 2 and the accumulating adder 4 go to the zero state, the clock pulses C1 and C2 from the second and third outputs become equal to zero, and the readiness output of result 14 from the fourth output enters unit (1). For a clocking pulse 50 C2 into counter 2, there is a unit that, taking into account the offset of the data grid of counter 2 relative to accumulating adder 4 and one in its lower information bit 55, forms the expression (2) used in the next step of the function calculation. If the value of the input code of the argument X is less than the output code of counter 2, i.e. , then zero signansh signal readiness. The device enters the mode of waiting for the start signal (vertex 17 GSA).
При поступлении данных на вход 8 аргумента с входа 13 запуска устройства поступает единичный сигнал , по которому четвертый выход блока 7 управлени переходит в нулевое состо ние, сигнал готовности данных RA становитс равным нулю (вершина 18 ГСА), а блок 7 управлени переходит в режим проверки единичного сигнала равенства данных , поступающего с третьего выхода схемы 1 5 сравнени (вершина 19 ГСА). При выполнении этого услови , т.е. равенства входного кода аргумента X, поступающего с входа 8, со значением выходного кода счетчика 2, на четвертомWhen data is received at the input 8 of the argument from the input 13 of the device launch, a single signal is received, according to which the fourth output of the control unit 7 goes to the zero state, the data readiness signal RA becomes equal to zero (GSA vertex 18), and the control unit 7 goes to the test mode a single data equality signal coming from the third output of the comparison circuit 1 5 (vertex 19 GSA). If this condition is met, i.e. the equality of the input code of the argument X, coming from the input 8, with the value of the output code of the counter 2, on the fourth
00
5five
00
5five
00
выходе схемы 7 управлени , а следовательно , и на выходе 14 готовности результата устанавливаетс единичный сигнал (вершина 16 ГСА). В противном случае блок 7 управлени вырабатывает на втором и третьем выходах последовательность импульсных сигналов С1 и С2 (вершины 20-22 ГСА), инициализирующих вычислительный процесс до выполнени услови (вершина 19 ГСА).The output of the control circuit 7 and, consequently, a single signal (vertex 16 HSU) is set at the output 14 of the result readiness. Otherwise, the control unit 7 generates at the second and third outputs a sequence of pulsed signals C1 and C2 (vertices 20-22 of GSA), initializing the computational process before the condition is satisfied (vertex 19 GSA).
Вычислительный процесс происходит следующим образом.The computational process is as follows.
Если значение входного кода аргумента X больше выходного кода счетчика 2, т.е. , то на выходе больше схемы 1 сравнени будет сформирован единичный сигнал, по которому пр мые выходы счетчика 2 через первые информационные входы мультиплексора 3 подключатс к N-1 старшим разр дам информационного входа накапливающего сумматора 4, а элемент И 5 разрешит прохождение тактирующих импульсов С2 на суммирующий входIf the value of the input code of the argument X is greater than the output code of counter 2, i.e. , then a single signal will be formed at the output greater than the comparison circuit 1, according to which the direct outputs of counter 2 through the first information inputs of multiplexer 3 are connected to N-1 most significant bits of information input of accumulating adder 4, and element 5 will allow C2 pulses to pass through summing entry
жением (1). По тактирующему импульсу С2 в счетчик 2 запншест единица, котора с учетом смещени разр дной сетки данных счетчика 2 относительно накапливающего сумматора 4 и единицы в его младшем информационном разр де образует выражение (2), используемое на следующем шаге вычислени функции. Если значение входного кода аргумента X меньше выходного кода счетчика 2, т.е. , то нулевым сигна3(1). For the clocking pulse C2 into counter 2, there is a unit that, given the offset of the data grid of counter 2 relative to accumulating adder 4 and the unit in its least significant bit, forms the expression (2) used in the next step of the function calculation. If the value of the input code of the argument X is less than the output code of counter 2, i.e. , then zero signal3
лом с выхода больше схемы 1 сравнени инверсные выходы счетчика 2 через вторые информационные входы мультиплексора 3 нодключатс к N-1 старшим разр дам информационного вхда накапливающего сумматора 4, а на его вход переноса поступит единич- ньй сигнал, который образуетс путе инвертировани нулевого логического сигнала с шины 11 информационного нул в мультиплексоре 3. Этим осуществл етс образование дополнительного кода отрицательного приращени функции h(x) при поступлении на вхо 8 аргумента X, значение которого меньше предыдущего.scrap from the output is larger than circuit 1 comparing inverse outputs of counter 2 through the second information inputs of multiplexer 3 are connected to the N-1 senior bits of the information input of accumulating adder 4, and a single signal is received at its transfer input, which is formed by inverting the zero logical signal with bus 11 information zero in multiplexer 3. This forms the additional code of the negative increment of the function h (x) when the argument X arrives at input 8, the value of which is less than the previous one.
Вычислительный пр.оцесс при этом происходит аналогично описанному за исключением того, что при этом единичным сигналом с выхода меньше схемы 1 сравнени разрешаетс проходение тактирующих сигналов С2 через элемент И 6 на вычитающий вход счетчика 2.In this case, the computational process proceeds in the same way as described, except that the single signal from the output less than the comparison circuit 1 permits the passage of the clock signals C2 through the element 6 to the subtracting input of the counter 2.
Таким образом, при вычислении ел дующего значени квадратичной функц используетс предыдущее значение функции, что позвол ет повысить бысродействие устройства при отработке малых приращений аргумента. Кроме этого, устройство имеет высокую помехоустойчивость к единичным сбо м входных данных, если они не привод к изменению сигналов на выходах больше или меньше схемы 1 сравнени и не сказываютс на конечном результате, В противном случае устройство выполнит обратное требуемом действие (например, вмес.то суммировани выполнит вычитание приращени функции), однако после восстановлени значени аргумента процесс вычислени функции будет продолжен до момента получени истинного значени результата,Thus, when calculating the next quadratic func tion value, the previous value of the function is used, which allows to increase the speed of the device during the development of small increments of the argument. In addition, the device has a high noise immunity to single input data breaks, if they do not lead to a change in the signals at the outputs of more or less comparison circuit 1 and do not affect the final result. Otherwise, the device will perform the reverse required action (for example, the summation performs the subtraction of the function increment), however, after restoring the argument value, the process of calculating the function will continue until the actual value of the result is obtained,
Пример 1 , Вычислительный про цесс возведени в квадрат числа 6 (000110,2) начинаетс после поступлени сигнала начальной установки SR При этом состо ние выходов ,I 1 сравнени , счетчика 2, накапливающего сумматора А и сигнала готовности RA на клемме 14 будет измен тьс в соответствии с табл. 1.Example 1 The computational process of squaring the number 6 (000110,2) begins after the arrival of the initial setup signal SR. This state of the outputs, I 1 comparison, counter 2, accumulating adder A and readiness signal RA on terminal 14 will change to according to tab. one.
П р и м е р 2, Предположим, что после четвертого вычислени произошел сбой, в результате которого на входе образовалс нулевой код. Посл выполнени текущего шага вычислени Example 2 Suppose that after the fourth calculation a failure occurred, resulting in a zero code at the input. After completing the current calculation step
JQ 5 Jq 5
20 20
25 о 525 about 5
5five
00
00
5five
данные на входе восстановились и стали равными 6 (000110), Вычислительный процесс в этом случае будет проходить в соответствии с табл,2.the input data was restored and became equal to 6 (000110). In this case, the computational process will be carried out in accordance with Table 2.
Из табл,2 видно, что в отличие от примера 1 врем вычислени увеличилось на два шага, однако конечный результат осталс без изменени .From Table 2, it can be seen that, in contrast to Example 1, the calculation time increased by two steps, but the final result remained unchanged.
П р и м е р 3. Предположим, что значение аргумента по сравнению с примером 1 изменилось и стало равным . 4, Тогда вычислительный процесс будет протекат в соответствии с табл.3.PRI me R 3. Suppose that the value of the argument in comparison with example 1 has changed and become equal. 4, Then the computational process will proceed in accordance with Table 3.
Таким образом, если дл возведени в квадрат в примере 1 потребовалось 4 шага вычислений, то в примере 3 возведение в квадрат произошло за 2 шага.Thus, if for squaring in example 1 it took 4 steps of calculations, then in example 3, squaring occurred in 2 steps.
Чем больше величина входного аргумента и меньше величина его приращени , тем значительнее повышаетс быстродействие устройства.The larger the value of the input argument and the smaller the value of its increment, the greater the increase in the speed of the device.
Claims (3)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU853863975A SU1280616A1 (en) | 1985-02-28 | 1985-02-28 | Device for squaring numbers |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU853863975A SU1280616A1 (en) | 1985-02-28 | 1985-02-28 | Device for squaring numbers |
Publications (1)
Publication Number | Publication Date |
---|---|
SU1280616A1 true SU1280616A1 (en) | 1986-12-30 |
Family
ID=21165807
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU853863975A SU1280616A1 (en) | 1985-02-28 | 1985-02-28 | Device for squaring numbers |
Country Status (1)
Country | Link |
---|---|
SU (1) | SU1280616A1 (en) |
-
1985
- 1985-02-28 SU SU853863975A patent/SU1280616A1/en active
Non-Patent Citations (1)
Title |
---|
Авторское свидетельство СССР № 894705, кл. G 06 F 7/552, 1979. Авторское свидетельство СССР ,№ 1010620, кл. G 06 F 7/552, 1981. * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
SU1280616A1 (en) | Device for squaring numbers | |
GB1314841A (en) | Asynchronous circuits and logic | |
US3311739A (en) | Accumulative multiplier | |
SU1388852A1 (en) | Multiplier | |
SU1070545A1 (en) | Computing device | |
SU1319028A1 (en) | Digital pulse repetition frequency multiplier | |
SU1193668A1 (en) | Multiplying device | |
SU1103226A1 (en) | Device for computing square root | |
SU1325468A1 (en) | Computing device | |
SU1760631A1 (en) | Ring counter | |
SU1262479A1 (en) | Adder-accumulator | |
SU1309020A1 (en) | Multiplying device | |
JPS5866445A (en) | signal matching circuit | |
SU1156067A1 (en) | Device for calculating value of log z with base 2 | |
SU372543A1 (en) | FREQUENCY-PULSE MONITORING SYSTEM | |
SU1295414A1 (en) | Computer device for digital processing of signals | |
SU1401448A1 (en) | Apparatus for implementing boolean symmetrical functions | |
SU1111154A1 (en) | Multiplying device | |
SU1667061A1 (en) | Multiplication device | |
SU437061A1 (en) | Markov Chain Generator | |
SU1075260A1 (en) | Device for making summation of m n-bit numbers arriving in sequential order | |
SU1259253A1 (en) | Calculating device | |
SU1357947A1 (en) | Device for division | |
SU1171784A1 (en) | Multiplier | |
SU1377860A1 (en) | Device for monitoring accumulator |