SU991423A1 - Device for computing difference of two numbers - Google Patents

Device for computing difference of two numbers Download PDF

Info

Publication number
SU991423A1
SU991423A1 SU813315881A SU3315881A SU991423A1 SU 991423 A1 SU991423 A1 SU 991423A1 SU 813315881 A SU813315881 A SU 813315881A SU 3315881 A SU3315881 A SU 3315881A SU 991423 A1 SU991423 A1 SU 991423A1
Authority
SU
USSR - Soviet Union
Prior art keywords
output
input
counter
counters
trigger
Prior art date
Application number
SU813315881A
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 SU813315881A priority Critical patent/SU991423A1/en
Application granted granted Critical
Publication of SU991423A1 publication Critical patent/SU991423A1/en

Links

Description

(54)-УСТРОЙСТВО ДЛЯ ВЫЧИСЛЕНИЯ РАЗНОСТИ ДВУХ ЧИСЕЛ(54) - DEVICE TO CALCULATE THE DIFFERENCE OF TWO NUMBERS

Claims (2)

Изобретение относитс  к автоматике и вычислительной технике и може быть использовано в различных цифровых приборах и устройствах. Известно устройство дл  определен разности кодов или частот, содержащее счетчики промежуточной пам ти, триггеры, устройства управлени  переносом информации, элементы И и ИЛИ счетчик результата 11Недостатком устройства  вл етс  низкое быстродействие, так как относительное значение разности вычисл етс  с помощью промежуточного вычислени  соотношени . Наиболее близким к изобретению  вл етс  устройство дл  вычислени  разности двух чисел, содержащее первый , второй и третий счетчики, певый , второй и третий триггеры, первы второй и третий элементы И, элемент ИЛИ и генератор тактовой частоты, причем счетные входы первого и второго счетчиков объединены между собой 2. Недостатком такого устройства  вл етс  то, что оно вычисл ет только абсои:ютную разность двух чисел. Цель изобретени  - расширение , функциональных возможностей устройст ва за счет получени  возможности вычислени  относительной.разности двух чисел. Цель достигаетс  тем, что в устройство введены управл ег ый делитель частоты и переключатель на два пололожени , причемсчетный вход первого счетчика соединен с общим контактом переключател , контакт первого положени  которого соединен с выходом управл емого делител  частоты, а контакт второго положени  - с тактовым входом управл емого делител  частоты и с выходом генератора тактовой частоты , выход первого счетчика соединен с входом установки в единицу первого триггера, пр мой выход которого соединен с первыми входа1уш первого и второго элементов И, а инверсный выход с первым входом третьего элемента И, выход второго счетчика соединён с входом установки в единицу второго триггера , пр мой-выход которого соединен со вторыми входами первйго и третьего элементов И, а инверсный выход - со . вторым входом второго эле1./йнта И, третьи входы первого, второго и третьего элементов.И объединены и соедич нены с выходом генератора тактовой частоты, установочные входы первого и второго счетчиков соединены соответственно с шинами записи вычитаемо го и уменьшаемого чисел, установочные входы управл емого делител  частоты соединенТ.соответственно с шино записи вычитаемого -числа, выход первого элемента И соединен с входом ус тановки в ноль первого и второго сче чиков и первого и второго триггеров, (ВЫХОД второго элемента И соединен с выходом первого элемента И, входом установки в единицу третьего триггера и с первым входом элементаИЛИ, второй вход которого соединен с входом установки в ноль третьего триггера и с выходом третьего элемента И, выход элемента ИЛИ соединен со счетным входом третьего счетчика, который  вл етс  счетчиком результата , а инверсный выход третьего три гера  вл етс  знаковым выходом устройства . На чертеже представлена блок-схема устройства. Схема содержит управл емый делитель 1 частоты, счетчики 2 ,. 3, шину 4 вычитаемого числа, шину 5 уменьшае мого числа, генератор 6 тактовой частоты, триггеры 7-9, элементы И 10 12, элемент ИЛИ 13, счетчик 14 результата и переключатель 15, на два положени , причем счетные входы счет чиков 2 и 3 объединены и соединены с общим контактом переключател  1-5, контакт первого положени  которого соединен с выходом управл емого делител  1 частоты, а контакт второго положени  - с тактовым входом управл емого делител  частоты и с выходом генератора 6 тактовой частоты выход счетчика 2 соединен с.входом установки в единицу триггера 7, пр мой выход которого соединен с первыми входами элементов И 10 - 11, а инверсный выход - с первым входом элемента И 12, .выход счетчика 3 соединен с входом установки в единицу триггера 8,пр мой выход которого соединен со вторыми входами элементов И 10 и 12, а инверсный - со вторым входом элемента И 11, третьи входы элементов И 10 - 12 объединены и соединены с выходом генерато ра б тактовой частоты, установочные входы счетчиков 2 и 3 соответственно , соединены с шиной 4 вычитаемого чис ла и шиной 5 уменьошаемого числа, ус тановочные входы управл емого делител  1 частоты соответственно соединены с шиной 4 вычитаемого числа, выход элемента И 10 соединен с входами установки в ноль счетчиков 2 и 3 и триггеров 7 и 8, выход элемен та И 11 соединен с выходом элемента И 10, входом установки в единицу триггера 9 и с первым входом элемента ИЛИ 13, второй вход которого соединен с входом установки в ноль триггера 9 и с выходом элемента И 12, выход элемента ИЛИ 13 соединен со счетным входом счетчика 14 результата . Устройство работает следующим образом. По шинам 4-5 в управл емый делитель 1 частоты и счётчики 2-3 параллельным кодом записываютс  значени  составл ющих разности: уменьшаемого N и вычитаемого Nj,, после чего .начинаетс  дополнение счетчиков 2-3 импульсами выходной частоты управл емого делител  1 частоты f, - опорна  частота коэффициент пропорциональности ( при первом положении переключател  15J , либо импульсами выходной частоты генератора 6 опорной частоты f, (при втором положении переключател  Рассмотрим работу устройства дл  случа , когда переключатель 15 находитс  в первом положении. Счетчики 2 и 3 имеют одинаковую N и перепол ютс  соответст-. ственно NQ - N и о - 1м импульсами частоты f , т.е. интервал времени между моментами переполнени  счетчиков определитс  как T.KN.|-f.i. Il IQ i Данный интервал в схеме предлагаемого устройства фиксируетс  следующим образом. Импульсы переполнени  счечиков 2-3 устанавливают в единичное состо ние RC-триггеры 7-8 последовательно во времени. Первым переполн етс  счетчик, в котором было записано большее число. Очередность срабатывани  триггеров определ ет разрешение на прохождение опорной частоты через один из элементов И 1112 , EcjJri N, то первым срабатывает триггер 8 и сигнал разрешени  проходит на вход элемента И 12. При срабатывании триггера 7 разрешающий сигнал блокируетс . Таким образом , смена состо ни  элемента И 12 (либо элемента И 11 при N происходит через интервал времени между .переполнени ми счетчиков 2-3,рав- .ный Ту,. В течение этого времени на вход элемента И 12 (либо ИЛИ 13 и через элмент ИЛИ 13 на вход счетчика 14 результата поступит импульс опорной частоты . H-T,. Таким образом, число N, записываемое В счетчике 14 результата, пропорционально относительному значению разности двух составл ющих N и Nj. Соответствуюииим выбором значени - К ,можно получить отсчет результата в процентах, т.е. процентную разность ,двух чисел, отнесенную к значению вычитаемого М-- -юо/. N а разности определ етс  состо ние триггера 9. Запись в триггер единичного состо ни  осуществл етопервый импульй с выхода элемента И 11 тогда , когда первый срабатывает триггер 7, т.е.. при bjj. Таким образом единичное состо ние триггера 9 соответствует отрицательному значению : разности. Элемент И 10 служит дл  формировани  импульса сброса всей схемы, кроме счетчика 14 результата после переполнени  обоих счетчиков При установке переключател  15 во второе положение, когда дополнение счетчиков 2-3 до полной емкости производитс  импульсами генератора 6 тактовой частоты, результат вычислений . представл ет абсолютное значение разности N - Nj. Предложенное устройство позвол ет вычисл ть разность двух чисел, как в абсолютных, так и в относительных (в частности г- в процентных) значени х по отношению к вычитаемому числу, что значительно расшир ет его функциональные возможности. Формула изобретени  Устройство дл  вычислени  разности двух чисел, содержащее первый, второй и третий счетчики, первый, второй и третий триггеры, первый, второй и третий элементы И, элемен ИЛИ и генератор тактовой частоты, причем счетные входы первого и второ го счетчиков объединены между собой, отличающеес  тем, что, с целью расширени  функциональных возможностей за счет вычислени  относи тельной разности двух чисел, в него вве дены управл еъмй делитель частоты и иё ,Е еключатель на два положени , причем счетный вход первого счетчика соединен с общим контактом переключател , контакт первого положени  которого соединен с выходе управл емого делител  частоты, а контакт второго ; положени  - с тактовым входом управл емого делител  частоты и с выходом генератора тактовой частоты, выход первого счётчика соединен с входом установки в единицу первого триггера/ пр мой выход которого соединен с первыми входами первого и второго элементов И, а- инверсный выход - с первым входом третьего элемента И, выход второго счетчика соединен с входом установки в единицу второго триггера, пр мой выход- которого соединён со вторыми входами первого и третьего элементов И, а инверсный выход - со вторым входом второго элемента и, третьи входы первого, второго и третьего элементов И объединены и соединены с выходом генератора тактовой частоты, установочные входы v первого и второго счетчиков соединены соответственно с шинами записи вычитаеомго и уменьшаемого чисел, установочные входы управл емого делител  частоты соединены соотве.тстио венно с шиной записи вычитаемого числа , выход первого элементй исоединен с входами установки в ноль первого и второго счетчиков и первого и второго триггеров, выход второго элемента И соединен с выходом первого элемента И входом установки в единицу третьего триггера и с первым входом элемента ИЛИ, второй вход ко .торого соединен с входом установки в. (ноль третьего триггера и с выходом третьего элемента И,выход элемента ИЛИ соединен со счетным входом третье го счетчика, который  вл етс  счетчиком результата, а инверсный выход третьего триггера  вл етс  знаковым выходом устройства. Источники информации, прин тые во внимание при экспертизе 1. Гореликов Н.И., Лирман И.Г. Цифровой измеритель соотношени  линейны скоростей вращающихс  валов . - Приборы и системы управлени , 10, 1971. The invention relates to automation and computing and can be used in various digital devices and devices. A device is known for determining code or frequency differences containing intermediate memory counters, flip-flops, information transfer control devices, AND and OR elements of result 11. The device’s disadvantage is poor performance, since the relative difference value is calculated using an intermediate ratio calculation. The closest to the invention is a device for calculating the difference of two numbers, containing the first, second and third counters, first, second and third triggers, the first second and third AND elements, the OR element and the clock generator, the counting inputs of the first and second counters are combined between themselves 2. The disadvantage of such a device is that it calculates only the absolute number: the difference of two numbers. The purpose of the invention is to expand the functionality of the device by making it possible to calculate the relative difference of two numbers. The goal is achieved by introducing a controlled frequency divider and a two position switch into the device, with the counting input of the first counter connected to the common contact of the switch, the contact of the first position of which is connected to the output of the controlled frequency divider, and the contact of the second position to the clock control input frequency divider and with the output of the clock frequency generator, the output of the first counter is connected to the input of the unit installation of the first trigger, the direct output of which is connected to the first1ush input of the first and second And th elements and output inverse to the first input of the third AND gate, the output of the second counter is connected to an input setting unit in the second flip-flop, a straight-output is connected to second inputs pervygo and third AND elements and inverse output - with. the second input of the first elet. / ion, the third inputs of the first, second and third elements. And they are combined and connected to the output of the clock frequency generator; the installation inputs of the first and second counters are connected to the write buses of the subtracted and decremented numbers, respectively; the frequency divider is connected T. according to the write bus of the deductible — the number, the output of the first element I is connected to the input of the installation to zero of the first and second counters and the first and second triggers, (the OUTPUT of the second element I is connected to the output of the first element AND, the installation of the third trigger unit and the first input of the OR element, the second input of which is connected to the input of the third trigger and zero output of the third AND element, the output of the OR element is connected to the counting input of the third counter, which is the result counter The inverse output of the third three is the sign output of the device. The drawing shows the block diagram of the device.The circuit contains a controlled frequency divider 1, counters 2,. 3, bus 4 of the subtracted number, bus 5 of the decremented number, clock frequency generator 6, triggers 7-9, elements AND 10 12, element OR 13, result counter 14 and switch 15, for two positions, the counter inputs of counters 2 and 3 are combined and connected to the common contact of the switch 1-5, the contact of the first position of which is connected to the output of the controlled frequency divider 1, and the contact of the second position to the clock input of the controlled frequency divider and the output of the 6 clock frequency generator is connected to the counter 2. unit setup input trig Hera 7, the direct output of which is connected to the first inputs of the AND 10-11 elements, and the inverse output to the first input of the I 12 element, the output of the counter 3 is connected to the input of the unit of the trigger 8, the direct output of which is connected to the second inputs of the elements Both 10 and 12, and inverse with the second input of the element 11, the third inputs of the elements 10 and 12 are combined and connected to the output of the clock frequency generator, the installation inputs of counters 2 and 3, respectively, are connected to the bus 4 of the subtracted number and bus 5 diminishing number, settable control inputs about the divider 1 frequency, respectively, connected to bus 4 of the subtracted number, the output of the element And 10 is connected to the inputs of the installation in zero of the counters 2 and 3 and the triggers 7 and 8, the output of the element And 11 is connected to the output of the element And 10, the input of the installation in the unit of trigger 9 and with the first input of the element OR 13, the second input of which is connected to the input of the zero setting of the trigger 9 and with the output of the element 12, the output of the element OR 13 is connected to the counting input of the result counter 14 of the result. The device works as follows. Tires 4-5 in the controlled frequency divider 1 and counters 2-3 with a parallel code record the components of the difference: decreasing N and subtracted Nj, after which counters 2-3 are added to the output frequency pulses of the controlled splitter 1 frequency f, - reference frequency proportionality factor (at the first position of the switch 15J, or pulses of the output frequency of the generator 6 of the reference frequency f, (at the second position of the switch Consider the operation of the device for the case when the switch 15 is in the first field The counters 2 and 3 have the same N and overflow, respectively, NQ - N and about - 1m frequency pulses f, i.e. the time interval between the moments of overflow of the counters is defined as T.KN. | -fi Il IQ i Given The interval in the circuit of the proposed device is recorded as follows: The overflow pulses of the strips 2-3 are set to one unit RC-triggers 7-8 successively in time. The first counter overflows in which a larger number was recorded. The trigger sequence determines whether the reference frequency passes through one of the elements 1111, EcjJri N, the trigger 8 is triggered first and the resolution signal passes to the input of the element 12. When the trigger 7 is triggered, the enabling signal is blocked. Thus, the change in the state of the element AND 12 (or the element AND 11 at N occurs after a time interval between overflows of counters 2-3, equal to TU ,. During this time, the input of the element AND 12 (either OR 13 and through the element OR 13, a reference frequency pulse will arrive at the input of the result counter 14. HT. Thus, the number N recorded in the result counter 14 is proportional to the relative value of the difference between the two components N and Nj. in percent, i.e. percentage difference, two x numbers, referred to the value of the subtracted M-- -yo /. N and the difference is determined by the state of the trigger 9. Writing a single state into the trigger produces the first pulse from the output of the element 11 when the first trigger 7, i.e. at bjj. Thus, the single state of flip-flop 9 corresponds to a negative value: the difference. Element And 10 serves to generate a reset pulse for the entire circuit, except for the result counter 14 after the two counters overflow When the switch 15 is set to the second position, when the addition of the counter 2-3 to full capacity produced by pulses of a clock frequency generator 6, the result of the calculations. represents the absolute value of the difference N - Nj. The proposed device allows to calculate the difference of two numbers, both in absolute and relative (in particular, r - in percentage) values relative to the subtracted number, which greatly expands its functionality. Apparatus of the Invention A device for calculating the difference of two numbers, comprising first, second and third counters, first, second and third triggers, first, second and third elements AND, an element OR, and a clock frequency generator, the counting inputs of the first and second counters being combined , characterized in that, in order to extend the functionality by calculating the relative difference of two numbers, a control divider of frequency and i, E switch are put into two positions, and the counter input of the first counter is inen with the common contact of the switch, the contact of the first position of which is connected to the output of the controlled frequency divider, and the contact of the second; position - with the clock input of the controlled frequency divider and with the output of the clock frequency generator; the output of the first counter is connected to the installation input of the first trigger unit / direct output of which is connected to the first inputs of the first and second elements I, and the inverse output to the first input The third element is And, the output of the second counter is connected to the input of the installation in the unit of the second trigger, the direct output of which is connected to the second inputs of the first and third elements And, and the inverse output to the second input of the second element and, third the first, second, and third I moves are combined and connected to the output of the clock frequency generator, the setup inputs v of the first and second counters are connected respectively to the subtract and decrement number recording buses, the setup inputs of the controlled frequency divider are connected to the subtracted number write bus , the output of the first element is connected to the inputs of setting the first and second counters to zero and the first and second triggers, the output of the second element is And is connected to the output of the first element And the input of the mouth in the unit of the third trigger and with the first input of the OR element, the second input of the second one is connected to the installation input of the. (zero of the third trigger and with the output of the third element AND, the output of the OR element is connected to the counting input of the third counter, which is the result counter, and the inverse output of the third trigger is the sign output of the device. Information sources taken into account in the examination 1. Gorelikov, NI, Lirman, IG A digital ratio meter, linear speeds of rotating shafts, Devices and Control Systems, 10, 1971. 2. Авторское свидетельство СССР № 686029, кл. G 06 F 7/62, 1977 (прототип ).2. USSR author's certificate No. 686029, cl. G 06 F 7/62, 1977 (prototype).
SU813315881A 1981-07-17 1981-07-17 Device for computing difference of two numbers SU991423A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU813315881A SU991423A1 (en) 1981-07-17 1981-07-17 Device for computing difference of two numbers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU813315881A SU991423A1 (en) 1981-07-17 1981-07-17 Device for computing difference of two numbers

Publications (1)

Publication Number Publication Date
SU991423A1 true SU991423A1 (en) 1983-01-23

Family

ID=20968590

Family Applications (1)

Application Number Title Priority Date Filing Date
SU813315881A SU991423A1 (en) 1981-07-17 1981-07-17 Device for computing difference of two numbers

Country Status (1)

Country Link
SU (1) SU991423A1 (en)

Similar Documents

Publication Publication Date Title
US3609326A (en) Counting apparatus and method using separate counters for reference and unknown signal
SU991423A1 (en) Device for computing difference of two numbers
GB1501279A (en) N scale counter
SU938280A1 (en) Device for number comparison
SU798831A1 (en) Frequency multiplier
SU859941A1 (en) Device for measuring frequency change rate
SU960843A1 (en) Entropy determination device
SU834663A1 (en) Multichannel device for time intervals in non-periodic pulse trains
SU750480A1 (en) Device for comparing numbers with tolerances
SU940082A1 (en) Digital frequency meter
SU1210099A1 (en) Speed meter with quasi-constant measuring error
SU911525A1 (en) Frequency dividing device
SU864578A1 (en) T flip-flop
SU968765A1 (en) Digital device for determining speed and acceleration code
SU819973A1 (en) Counting device
SU888123A1 (en) Device for monitoring digital objects
SU457936A1 (en) Device for determining the orthogonality of two vectors
SU783790A1 (en) Number comparing device
RU1774307C (en) Time scale corrector
SU599264A1 (en) Device for determining the difference between two numbers
SU729528A1 (en) Digital phase meter
SU608170A1 (en) Divider
SU537452A2 (en) Synchronizer independent pulse sequences
SU798833A1 (en) Multiplying-dividing device
SU733100A1 (en) Device for determining the length of transistory process