SU822182A2 - Device for computing the difference between two n-digit numbers - Google Patents

Device for computing the difference between two n-digit numbers Download PDF

Info

Publication number
SU822182A2
SU822182A2 SU782666891A SU2666891A SU822182A2 SU 822182 A2 SU822182 A2 SU 822182A2 SU 782666891 A SU782666891 A SU 782666891A SU 2666891 A SU2666891 A SU 2666891A SU 822182 A2 SU822182 A2 SU 822182A2
Authority
SU
USSR - Soviet Union
Prior art keywords
output
register
input
registers
counter
Prior art date
Application number
SU782666891A
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 SU782666891A priority Critical patent/SU822182A2/en
Application granted granted Critical
Publication of SU822182A2 publication Critical patent/SU822182A2/en

Links

Description

54) УСТРОЙСТВО дл  ВЫЧИСЛЕНИЯ РАЗНОСТИ ДВУХ п-РАЗРЯДНЫХ ЧИСЕЛ54) DEVICE FOR CALCULATING THE DIFFERENCE OF TWO N-BIT NUMBERS

1one

Изобретение относитс  к автоматике и вычислительной технике и моисет быть использовано в системах обработки информации и управлени . По основному авт.св. № 739532 известно устройство дл  вычислени  разности двух-п-разр дных чисел,содержащее счетчики-регистры уменьшаемого и вычитаемого, генератор импульсовJ триггеры и элементы И, причем входы счетчиков-регистров вычитаемого соединены с первым выходом генератора импульсов, выход .The invention relates to automation and computing and can be used in information processing and control systems. According to the main auth. No. 739532, a device for calculating the difference of two-n-bit numbers, containing counters for decreasing and subtracting, a generator of pulses, triggers and elements, And the inputs of counters of registers of the subtracted are connected to the first output of the generator of pulses, an output.

Г-ого (i 1,...,п) счетчика-ре гистра вычитаемого соединен с единичным входом i-oro триггера первой группы триггеров, нулевой выход которого подключен к первому входу i-oro элемента И первойгруппы, второй вход которого соединен со вторым выходом генератора импульсов, а выход - со входом i-ого счетчикарегистра уменьшаемого, выход которого подключен к единичному входу i-ого триггера второй группы триггеров , единичный выход которого подключен к первому входу i-oro элемента И второй группы, выход которого подключен ко входу (-Г)-ого счетчика регистра уменьи1аемого, нулевые входы всех триггеров, вторые элементов И второй группы и дополнительный вход п-ого счетч ка регистра уменьшаемого подключены к третьему выходу генератора импульсов,The first (i 1, ..., p) counter-register of the deductible is connected to the single input of the i-oro trigger of the first group of triggers, the zero output of which is connected to the first input of the i-oro element I of the first group, the second input of which is connected to the second the output of the pulse generator, and the output with the input of the i-th counter register reduced, the output of which is connected to the single input of the i-th trigger of the second group of triggers, the single output of which is connected to the first input of the i-oro element II of the second group whose output is connected to the input ( -D) -th register counter zero, all the inputs of all the triggers, the second elements of the second group and the auxiliary input of the 5th counter of the register being reduced are connected to the third output of the pulse generator,

Недостатком данного устройства  вл етс  возможность производить операцию вычитани  только дл  случа , когда уменьшаемое больше или равно The disadvantage of this device is the ability to perform a subtraction operation only for the case when the deductible is greater than or equal to

0 вычитаемому. Цель изобретени  - расширение области применени  устройства.0 deductible. The purpose of the invention is to expand the field of application of the device.

Дл  достижени  поставленной цели устройство дл  вычислени  разности To achieve this goal, the device for calculating the difference

5 двух п-разр дных чисел содержит третью группу элементов И, причем первый вход Т-ого элемента И третьей группы подключен к выходу соответствующего счетчика-регистра умень0 шаемого, а второй вход - к четвертому- выходу генератора импульсов и входу соответствующего счетчика-регистра уменьшаемого,п тый выход генератора импульсов соединен с уста5 ново4ными входами ачетчиков-регистров уменьшаемого, а управл ющий вход - с выходом первого элемента И второй группы.5 two n-bit numbers contain the third group of elements AND, the first input of the T-th element AND of the third group is connected to the output of the corresponding counter-register decreasing, and the second input - to the fourth-output of the pulse generator and the input of the corresponding counter-register decremented , the fifth output of the pulse generator is connected to the set of new inputs of counters-registers decreasing, and the control input - with the output of the first element And the second group.

На чертеже изображена схема уст0 ройства.The drawing shows a diagram of the device.

Схема устройства содержит п счетчиков-регистров 1 вычитаемого, входы которых соединены с первым выходом генератора 2 импульсов. Выход i-oro ((,.. .,п) счетчика-регистра 1 соединен с единичным входом i-oro триггера 3 первой группы, нулевой выход которого соединен с первым входом 1-ого элемента И 4 первой группы. Первый выход генератора импульсов 2 соединен со входами счетчиков вычитаемого 1. Второй вход i-ого элемента И 4 соединен со вторым выходом генератора 2., а выход с первым входом i-oro счетчика-регистра 5 уменьшаемого. Выход i-oro счетчика-регистра 5 соединен с еди.ничным входом I-ого триггера б второй группы, нулевой вход которого соединен с третьим выходом генератора 2. Единичный выход j-oro (j-2,...,n-) триггера 6 соедине.н с первым входом j-ого элемента И 7 второй группы, выход которого соединен со вторым входом (j-l)-oro счетчика-регистра 5. Нулевой выход первого триггера б второй группы соединен с первым входом первого элемента И 7 второй группы, выход которого соединен с управл ющим входом генератора 2. Выход i-ого элемента И 8 третьей группы соединен с установочным входом i-oro счетчика-регистра 1 а первый вход с выходом i-ого счетчика-регистра 5. Нулевые входы триггеров 3 соединены с третьим выходом генератора 2. Четвертый выход генератора 2 соединен со вторыми входами элементов И 8 и с третьими входами счетчиков-регистров 5. Второй вход п-ого счетчика-регистра 5 и вторые входы .элементов И 7 соединены с , третьим выходом генератора 2, п тый выход которого соединен с установочными входами счетчиков-регистров 5. Количество состо ний счетчиковрегистров 1 и 5 равно основанию выбранной системы счислени .The device contains n counters-registers 1 subtracted, the inputs of which are connected to the first output of the generator 2 pulses. The i-oro output ((, ..., p) of the counter-register 1 is connected to the single input of the i-oro trigger 3 of the first group, the zero output of which is connected to the first input of the 1st element I 4 of the first group. The first output of the pulse generator 2 connected to the inputs of the counters of the subtracted 1. The second input of the i-th element And 4 is connected to the second output of the generator 2. And the output to the first input of the i-oro counter-register 5 is decremented. The output of the i-oro counter-register 5 is connected to the unit one the input of the first trigger b of the second group, the zero input of which is connected to the third output of the generator 2. A single The j-oro output (j-2, ..., n-) of trigger 6 is connected. It is connected to the first input of the j-th element And 7 of the second group, the output of which is connected to the second input (jl) -oro of the counter register 5. The zero output of the first trigger b of the second group is connected to the first input of the first element And 7 of the second group, the output of which is connected to the control input of the generator 2. The output of the i-th element And 8 of the third group is connected to the installation input i-oro of the counter-register 1 and the first input with the output of the i-th counter-register 5. The zero inputs of the triggers 3 are connected to the third output of the generator 2. The fourth in the generator 2 is connected to the second inputs of the And 8 elements and to the third inputs of the counter-registers 5. The second input of the nth counter-register 5 and the second inputs of the And 7 elements are connected to the third output of the generator 2, the fifth output of which is connected to the installation the inputs of the counters-registers 5. The number of states of the counters registers 1 and 5 is equal to the base of the selected number system.

Устройство работает следующим образом.The device works as follows.

В исходном состо нии в счетчикахрегистрах 1 поразр дно записано значение вычитаемого, а в счетчикахрегистрах 5 - значение уменьшаемого Старшие разр ды чисел записаны соответственно в счетчиках-регистрах 1/1 и 5/1. На выходах триггеров 3 и 6/1 наход тс  разрешающие потенциалы , а на выходах триггеров (6/2) - (б/п) запрещаюцие.In the initial state, in counters of registers 1, the value of the deductible is written bitwise, and in counters of registers 5 - the value of the decremented. The highest bits of the numbers are recorded in the counters-registers 1/1 and 5/1, respectively. At the outputs of the flip-flops 3 and 6/1, there are resolving potentials, and at the outputs of the flip-flops (6/2) - (b / n) prohibitory.

Дл  осуществлени  операций вычитани  генератор 2 вырабатывает паки импульсов.Количество импульсов в пачках на первом и четвертом выходах генератора 2 равно основанию выбранной системы счислени . Пачка импульсов на втором выходе .генератора 2 содержит на один импульс меньше . На третьем и п том выходах генератора 2 формируетс  по одному импульсу . Импульс на управл ющем входе генератора 2 управл ет очередностью формировани  пачек импульсов.To perform the subtraction operations, the generator 2 generates packs of pulses. The number of pulses in the bursts at the first and fourth outputs of the generator 2 is equal to the base of the selected number system. The pulse packet at the second output of the generator 2 contains one less pulse. At the third and fifth outputs of the generator 2, one pulse is generated. A pulse at the control input of the generator 2 controls the sequence of formation of the pulse bursts.

Примем, что уменьшаемое равно А, . .вычитаемое равно В, а основание выб ранной системы счислени  равно 0. Соответственно состо ние счетчиковрегистров 1/i и 5/i равно В4 и Ai.Let us assume that the decreasing is A,. The deductible is B, and the base of the selected number system is 0. Accordingly, the state of the register counters 1 / i and 5 / i is equal to B4 and Ai.

Импульсы генератора 2 с первого и второго выхода начинают поступать на вход счетчика 1/i и через элемент И 4/i на вход счетчика-регистра 5/i, Через Q-B|- импульсов на выходе счетчика 1/1 по витс  импульс пере-полнени ,перевод щий триггер 3/i в запрещающее состо ние. К этому моменту времени на вход счетчика 5/i . через элемент И 4/i поступают Q-(Bj+l) импульсов, так как во второй пачке на один импульс меньше, чем в первой. Состо ние счетчика 5/i станет равным A +Q-l-Bi. После окончани  последнего импульса в пачках с третьего и четвертого выходов генератора 2 поступает по одному импульсу, перевод щие в исходное состо ние триггеры 3, а также суммиру сь с состо нием счетчика-регистра 5/п. В случае переполнени  счетчика 5/J в процессе вычитани , соответствующий триггер б/j переводитс  началом импульса переполнени  в разрешающее состо ние, разреша  прохождение импульса с третьего выхода генератора 2 через элемент И 7/j на вход счетчика-регистра 5/J-1. -Своим окончанием этот импульс переводит триггеры 3 и б в исходное состо ние, подготавлива  устройство к новому вычитанию. В. случае А В импульс переполнени  с выхода счетчика-регистра 5/1 переводит триггер 6/1 в единичное состо ние-, причем сигнал с его нулевого выхода запрещает прохождение импульса через элемент И 7/1 на управл ющий вход генератора 2. Процесс вычитани  дл  этого случа  заканчиваетс  на данном этапе.The generator 2 pulses from the first and second output begin to flow into the input of the counter 1 / i and through the element AND 4 / i to the input of the counter-register 5 / i. Through the QB | - pulses at the output of the counter 1/1, the overfill pulse translating trigger 3 / i to prohibit state. To this point in time to the input of the counter 5 / i. Q- (Bj + l) pulses arrive through the AND 4 / i element, since in the second packet there is one less pulse than in the first one. The state of the 5 / i counter becomes equal to A + Q-l-Bi. After the end of the last pulse in the bursts from the third and fourth outputs of the generator 2, one pulse arrives, bringing the triggers 3 to the initial state, and also adding to the state of the counter-register 5 / p. In the event of the overflow of the 5 / J counter in the subtraction process, the corresponding trigger b / j is translated by the onset of the overflow pulse into the enable state, allowing the pulse to pass from the third output of the generator 2 through the And 7 / j element to the input of the counter register 5 / J-1. By its termination, this impulse translates the triggers 3 and b into the initial state, preparing the device for a new subtraction. B. In the case of A B, an overflow pulse from the output of the 5/1 counter-register translates the 6/1 trigger into a single state, and the signal from its zero output prevents the pulse from passing through the AND 7/1 element to the control input of the generator 2. Subtraction process for this case ends at this stage.

В случае А ; В импульс переполнени  с выхода счетчика-регистра 5/1 не возникает. Триггер 6/1 осг таетс  в состо нии, разрешающем прохождение импульса с третьего выхода генератора 2 через элемент И 7/1 на управл ющий вход генератора 2. Этот импульс несет информации о том, что полученна  разность (А-в) имеет отрицательное значение.In case A; An overflow pulse from the output of the counter-register 5/1 does not occur. The trigger 6/1 is reset in a state that permits the passage of a pulse from the third output of generator 2 through the element 7/1 to the control input of generator 2. This pulse carries information that the resulting difference (A-b) has a negative value.

Claims (1)

Процесс вычитани  продолжаетс  формированием импульсов на первом и четвертом выходах генератора 2 поступающих на входы счетчиков-регистров 1 на входы элемента И 8 и на третьи входы счетчиков-регистров 5. Импульс переполнени  с выхода 5 i-oro счетчикё-регистра 5 через i-и элемент И .8 поступает на установочный вход i-ого счетчика-регистра 1, перевод  его в нулевое состо ние. После окончани  пачек импульсов состо ние счетчиковрегистров 5 перепишетс  соответственно в счетчики-регистры 1. Далее формируютс  импульсы на третьем и п том выходах генератора 2, устанавлива  триггеры 3 и 6 в ис ходные, а счетчики-регистры 5 в нулевые состо ни . На следующем этапе производитс  вычитание содержимого счетчиковрегистров 1 из нулевого содержимого счетчиков-регистров 5 аналогично, как дл  случа  А В. Данное устройство позвол ет производить вычитание двух N-разр дных чисел. Если известное устройство позвол ет производить операцию вычи . тани  только дл  случа , когда умен шаемое больше или. равно вычитаемому то данное устройство вычисл ет разность чисел и в случае, когда умень шаемое меньше вычитаемого с определением знака полученной разности Эта особенность предлагаемого устройства в большей степени отвечает требовани м, предъ вл емым к цифровым приборам и системам управлени . Формула изобретени  Устройство дл  вычислени  разности двух п-разр дных чисел по авт.св. № 739532, от л ича ющ ее с   тем,что, с целью расширени  области применени  устройства, оно содержит третью группу элементов И, причем первый вход i-ого элемента И третьей группы подключён к выходу соответствурадего счетчика-регистра уменьшаемого, а второй вход - к четвертому ВЫХОДУ генератора импульсов и входу соответствующего счетчика-регистра уменьшаемого,п тый выход генератора импульсов соединен с установочными входами счетчиковрегистров уменьшаемого, а управл ю- . щий вход - с ВЫХОДОМ первого элемента И второй группы. Источники информации, прин тые во внимание при экспертизе 1. Авторское свидетельство СССР W 739532, кл. G Об F 7/50, 1977 (прототип).The subtraction process continues with the formation of pulses at the first and fourth outputs of the generator 2 arriving at the inputs of counters-registers 1 at the inputs of the element AND 8 and at the third inputs of the counters-registers 5. Overflow pulse from output 5 of the i-oro counter-register 5 through the i element And .8 arrives at the installation input of the i-th counter-register 1, transferring it to the zero state. After the end of the pulse bursts, the state of the registers 5 will be overwritten, respectively, into register-registers 1. Next, pulses are formed on the third and fifth outputs of generator 2, set triggers 3 and 6 to initial conditions, and registers 5 to zero. The next step is to subtract the contents of the register 1 counters from the zero contents of the counter-registers 5 in the same way as in case A. B. This device allows the subtraction of two N-digits. If the known device allows the operation to perform a calculation. tani only for the case when the decrease is greater or. equal to the deductible, this device calculates the difference of numbers and in the case when the decrease is less than the deductible with the definition of the sign of the difference obtained. This feature of the proposed device to a greater extent meets the requirements of digital devices and control systems. Claims of Invention A device for calculating the difference of two n-bit numbers by auth.St. No. 739532, from l with the fact that, in order to expand the field of application of the device, it contains the third group of elements AND, the first input of the i-th element AND the third group is connected to the output of the corresponding counter-register decremented, and the second input - to the fourth OUTPUT of the pulse generator and the input of the corresponding counter-register of the reduced, the fifth output of the pulse generator is connected to the installation inputs of the registers of the register to be reduced, and the control inputs -. The main input is with the OUTPUT of the first element AND the second group. Sources of information taken into account in the examination 1. USSR author's certificate W 739532, cl. G About F 7/50, 1977 (prototype).
SU782666891A 1978-09-07 1978-09-07 Device for computing the difference between two n-digit numbers SU822182A2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU782666891A SU822182A2 (en) 1978-09-07 1978-09-07 Device for computing the difference between two n-digit numbers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU782666891A SU822182A2 (en) 1978-09-07 1978-09-07 Device for computing the difference between two n-digit numbers

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
SU739532A Addition SU149416A1 (en) 1961-07-24 1961-07-24 Method of producing polychlorobutanes

Publications (1)

Publication Number Publication Date
SU822182A2 true SU822182A2 (en) 1981-04-15

Family

ID=20786377

Family Applications (1)

Application Number Title Priority Date Filing Date
SU782666891A SU822182A2 (en) 1978-09-07 1978-09-07 Device for computing the difference between two n-digit numbers

Country Status (1)

Country Link
SU (1) SU822182A2 (en)

Similar Documents

Publication Publication Date Title
GB994489A (en) Coordinate conversion system
SU822182A2 (en) Device for computing the difference between two n-digit numbers
SU1633529A1 (en) Device for majority sampling of asynchronous signals
SU798814A1 (en) Device for comparing numbers
SU1159031A2 (en) Device for implementing fast fourier transform
SU855652A1 (en) Device for comparing numbers
SU1569827A1 (en) Device for exbtraction of square root
SU840902A1 (en) Computer
SU739532A1 (en) Device for computing difference between two n-bit numbers
SU855658A1 (en) Digital device for computing functions
SU1023323A1 (en) Device for cube root extraction
SU684539A1 (en) Arrangement for taking logarithms of numbers
SU424142A1 (en) DEVICE COMPARISON OF TWO NUMBERS IN DIGITAL CODE
SU563674A1 (en) Binary numbers collator
SU1051556A1 (en) Device for reducing information redundancy
SU792262A1 (en) Apparatus for solving equations such as z2=x2+y2
SU1658150A2 (en) Device for square root extraction
SU999042A1 (en) Device for comparing numbers with tolerance
SU1481738A1 (en) Device for determining extreme numbers represented by pulse-numeric codes
SU1387004A2 (en) N-sensors-to-computer interface
SU1462354A1 (en) Device for fast actual fourier tranformation
UA137719U (en) FAILURE-RESISTANT SUMMARY OF EXCESSES a <sub> i </sub> I b <sub> i </sub> NUMBERS BY MODULE m <sub> i </sub>
SU758151A1 (en) Subtracting device
SU372543A1 (en) FREQUENCY-PULSE MONITORING SYSTEM
SU1608644A1 (en) Device for processing series code of golden proportion